This article explores AWS’s Security Token Service (STS) for requesting temporary, limited-privilege credentials for users to access AWS resources.
In this lesson, we explore AWS’s Security Token Service (STS), a web service that enables you to request temporary, limited-privilege credentials for users. STS essentially allows you to assume a role and receive temporary credentials that grant access to AWS resources without sharing long-term credentials.
Below are the primary STS API calls that you need to know:
Assume Role
This API call lets you assume a role. It returns temporary credentials that inherit the permissions of the specified role.
Assume Role with SAML
Use this API call to obtain temporary credentials for users who are authenticated via SAML.
Assume Role with Web Identity
Similar to the SAML method, this call returns temporary credentials for users authenticated through a web identity provider (e.g., Google, Facebook, or another OIDC provider).
Decode Authorization Message
This API decodes additional information from an error message when an AWS request fails, offering more insights into the error.
Get Caller Identity
This call returns details about the IAM user or role that issued the API call.
Get Session Token
This API retrieves credentials for users who have multi-factor authentication (MFA) enabled.
The parameter --role-session-name is a descriptive name provided to help identify the session. This output includes the Access Key ID, Secret Access Key, Session Token, and the expiration time for these temporary credentials.
By understanding and using these API operations, you will be well-prepared for AWS certification exams and real-world scenarios that require temporary AWS credentials.For further information, consider visiting the AWS STS Documentation.Happy learning and secure your AWS resources with best practices!