To enable them to do so, the SysOps administrator has created an application that authenticates a user and generates a SAML assertionWhich API call should be used to retrieve credentials for federated programmatic access?
sts:AssumeRole
sts:AssumeRoleWithSAML
sts:AssumeRoleWithWebIdentity
sts:GetFederationToken
Explanations:
sts:AssumeRoleis used for assuming a role directly with AWS credentials. It does not support SAML assertions for federated users.
sts:AssumeRoleWithSAMLis specifically designed to retrieve temporary security credentials for federated users using SAML assertions. This is the correct API call for SAML-based authentication.
sts:AssumeRoleWithWebIdentityis used for assuming roles with web identity providers like Amazon Cognito, Facebook, or Google, not for SAML assertions.
sts:GetFederationTokenis used for granting federated users temporary credentials but it is an older API that doesn’t support the more secure SAML-based authentication model used in this case.