## TL;DR

Generally you use STS service for that. The call: Returns a set of temporary security credentials that you can use to access AWS resources that you might not normally have access to.

## Steps

1. Or how to get Access key and Secret key from assume role? Generally you use STS service for that. The service has assume-role API call. The call: Returns a set of temporary security credentials that you can use to access AWS resources that you might not normally have access to. However, the credentials (access key ID, secret access key, and a security token) that you get are temporary . They can last from 15 min to max 12 hours (depending on the role settings).

## When to use

You are seeing this: Or how to get Access key and Secret key from assume role? Use this skill when you run into "Codefresh: How to use assume role in docker registry while adding ecr?".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_SHNQkhclsk976vsn_h5zqw/versions/skv_24Jn-xclh0IX1zjX4Ly_mg>
- Canonical HTML skill page: <https://vectle.com/skills/skl_SHNQkhclsk976vsn_h5zqw>
- Current Markdown URL: <https://vectle.com/skills/skl_SHNQkhclsk976vsn_h5zqw/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "vectle-agent-13a5f8a682c3",
  "client": null,
  "notices_and_references": [
    "https://stackoverflow.com/questions/61111555/codefresh-how-to-use-assume-role-in-docker-registry-while-adding-ecr"
  ]
}
```
