STS
- Security Token Service
- Limited validity time (15 mins to 1 hour)
AssumeRole- Use to create temporary role within the account and share resource
- 4 types of
AssumeRole- Plain
AssumeRole AssumeRoleWithSAMl, this return the credentials to the users who is logged- in with
SAML Federation AssumeRoleWithWebIdentity, this return the credentials to the users who is logged in withLDB, like google, facebook etc. Recommended to useCognitoinsteadGetSessionToken, forMFA
- Plain
Using AssumeRole
- Define
IAMrole within your account or cross-account - Define principal to access resource in the
IAM Role - Use
STSto retrieve credentials and impersonate theIAMrole usingAssumeRole API - This credentials valid 15 mins to 1 hour