Introduction to AWS STS
Security Token Service: temporary, limited-privilege credentials.
- 1 lesson
- Module quiz
Long-term credentials, such as an IAM user's access keys, are risky: if they leak, they remain valid until someone notices and deletes them. AWS therefore prefers temporary credentials, which expire on their own after a set time.
AWS Security Token Service (AWS STS) is the service that issues them. Whenever an identity assumes an IAM role, whether a developer switching roles, an application on Lambda or EC2, a user from a corporate identity provider or a system in another account, STS returns a short-lived access key, secret key and session token for that role. STS is free, and it is available through a global endpoint and Regional endpoints.
Where STS fits
Most developers use STS indirectly, because AWS services and the SDKs call it on their behalf. The exam, however, expects developers to know which STS operation suits which situation, such as assuming a role in another account, exchanging a web identity token or obtaining an MFA-protected session, and how long the resulting credentials last. STS also helps with troubleshooting: it can report which identity is making calls and decode the encoded messages that some services return when access is denied.
How this module is organised
The module has a single lesson, Choosing the Right AWS STS Operation for Temporary Credentials, which explains each STS operation, the lifetime of the credentials it returns, and how STS is used to diagnose permission problems.