> For the complete documentation index, see [llms.txt](https://mamawhocode.gitbook.io/aws/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mamawhocode.gitbook.io/aws/services/security/sts.md).

# STS

## API

### AssumeRole

```bash
aws sts assume-role
```

Once the request is successful, AWS generates and returns *<mark style="color:red;">temporary credentials</mark>* consisting of&#x20;

* an access key ID
* a secret access key
* a security token.&#x20;

### DecodeAuthorizationMessage

```bash
aws sts decode-authorization-message --encoded-message <encodedMessage>
```

This command will return a decoded message in ***JSON format*** that contains details about the unauthorized request:

* the user
* the action they attempted to perform
* any conditions that contributed to the denial.&#x20;

## Trivia

* AWS STS can’t be accessed on the AWS console; it is only accessible through API.
* All STS requests go to a single endpoint at <https://sts.amazonaws.com/>, and logs are then recorded to AWS CloudTrail.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mamawhocode.gitbook.io/aws/services/security/sts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
