<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AWSProfileName" value="AWS Default"/>
</appSettings>
</configuration>
AssumeRole within your account or for cross-account
access. For a comparison of AssumeRole with other API operations that
produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRole can be used
to make API calls to any Amazon Web Services service with the following exception:
You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
API operations.
AssumeRole for the ARN of the role
in the other account.
AssumeRole (as
long as the role's trust policy trusts the account).
AssumeRole. This is useful for cross-account scenarios to ensure
that the user that assumes the role has been authenticated with an Amazon Web Services
MFA device. In that scenario, the trust policy of the role being assumed includes
a condition that tests for MFA authentication. If the caller does not include valid
MFA information, the request to assume the role is denied. The condition in a trust
policy that tests for MFA authentication might look like the following example.
"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
AssumeRole, you pass values for the SerialNumber
and TokenCode parameters. The SerialNumber value identifies
the user's hardware or virtual MFA device. The TokenCode is the time-based
one-time password (TOTP) that the MFA device produces.
AssumeRoleWithSAML
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithSAML
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. Your role session lasts for the
duration that you specify, or until the time specified in the SAML authentication
response's SessionNotOnOrAfter value, whichever is shorter. You can provide
a DurationSeconds value from 900 seconds (15 minutes) up to the maximum
session duration setting for the role. This setting can have a value from 1 hour to
12 hours. To learn how to view the maximum value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRole API operation to assume a role,
you can specify the duration of your role session with the DurationSeconds
parameter. You can specify a parameter value of up to 43200 seconds (12 hours), depending
on the maximum session duration setting for your role. However, if you assume a role
using role chaining and provide a DurationSeconds parameter value greater
than one hour, the operation fails.
AssumeRoleWithSAML can
be used to make API calls to any Amazon Web Services service with the following exception:
you cannot call the STS GetFederationToken or GetSessionToken
API operations.
AssumeRoleWithSAML does not require the use of Amazon Web Services
security credentials. The identity of the caller is validated by using keys in the
metadata document that is uploaded for the SAML provider entity for your identity
provider.
AssumeRoleWithSAML can result in an entry in your CloudTrail
logs. The entry includes the value in the NameID element of the SAML
assertion. We recommend that you use a NameIDType that is not associated
with any personally identifiable information (PII). For example, you could instead
use the persistent identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithSAML, you must configure
your SAML identity provider (IdP) to issue the claims required by Amazon Web Services.
Additionally, you must use Identity and Access Management (IAM) to create a SAML provider
entity in your Amazon Web Services account that represents your identity provider.
You must also create an IAM role that specifies this SAML provider in its trust policy.
AssumeRoleWithWebIdentity operation,
it can also mean that the claim has expired or has been explicitly revoked.
AssumeRoleWithWebIdentity does not require the use of Amazon
Web Services security credentials. Therefore, you can distribute an application (for
example, on mobile devices) that requests temporary security credentials without including
long-term Amazon Web Services credentials in the application. You also don't need
to deploy server-based proxy services that use long-term Amazon Web Services credentials.
Instead, the identity of the caller is validated by using a token from the web identity
provider. For a comparison of AssumeRoleWithWebIdentity with the other
API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. You can provide a value from 900
seconds (15 minutes) up to the maximum session duration setting for the role. This
setting can have a value from 1 hour to 12 hours. To learn how to view the maximum
value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRoleWithWebIdentity
can be used to make API calls to any Amazon Web Services service with the following
exception: you cannot call the STS GetFederationToken or GetSessionToken
API operations.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithWebIdentity, you must
have an identity token from a supported identity provider and create a role that the
application can assume. The role that your application assumes must trust the identity
provider that is associated with the identity token. In other words, the identity
provider must be specified in the role's trust policy.
AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
logs. The entry includes the Subject
of the provided web identity token. We recommend that you avoid using any personally
identifiable information (PII) in this field. For example, you could instead use a
GUID or a pairwise identifier, as suggested
in the OIDC specification.
AssumeRoleWithWebIdentity
API, see the following resources:
AssumeRoleWithWebIdentity operation,
it can also mean that the claim has expired or has been explicitly revoked.
Client.UnauthorizedOperation response
(an HTTP 403 response). Some Amazon Web Services operations additionally return an
encoded message that can provide details about this authorization failure.
DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
action.
DecodeAuthorizationMessage
was invalid. This can happen if the token contains invalid characters, such as linebreaks.
AKIAIOSFODNN7EXAMPLE)
and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).
For more information about access keys, see Managing
Access Keys for IAM Users in the IAM User Guide.
AKIA
are long-term credentials for an IAM user or the Amazon Web Services account root
user. Access key IDs beginning with ASIA are temporary credentials that
are created using STS operations. If the account in the response belongs to you, you
can sign in as the root user and review your root user access keys. Then, you can
pull a credentials
report to learn which IAM user owns the keys. To learn who requested the temporary
credentials for an ASIA access key, view the STS events in your CloudTrail
logs in the IAM User Guide.
sts:GetCallerIdentity
action, you can still perform this operation. Permissions are not required because
the same information is returned when an IAM user or role is denied access. To view
an example response, see I
Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the IAM User Guide.
GetFederationToken
operation using the long-term security credentials of an IAM user. As a result, this
call is appropriate in contexts where those credentials can be safely stored, usually
in a server-based application. For a comparison of GetFederationToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
GetFederationToken using the security credentials of
an Amazon Web Services account root user, but we do not recommend it. Instead, we
recommend that you create an IAM user for the purpose of the proxy application. Then
attach a policy to the IAM user that limits federated users to only the actions and
resources that they need to access. For more information, see IAM
Best Practices in the IAM User Guide.
GetFederationToken in
any Amazon Web Services service except the following:
GetCallerIdentity.
GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation
Through a Custom Identity Broker.
Principal
element of the policy, the session has the permissions allowed by the policy. These
permissions are granted in addition to the permissions granted by the session policies.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
Department and department tag keys.
Assume that the user that you are federating has the Department=Marketing
tag and you pass the department=engineering session tag.
Department and department are not saved as separate tags,
and the session tag passed in the request takes precedence over the user tag.
GetSessionToken if you want to use MFA to protect
programmatic calls to specific Amazon Web Services API operations like Amazon EC2
StopInstances. MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA code that is associated with their MFA device. Using the temporary
security credentials that are returned from the call, IAM users can then make programmatic
calls to API operations that require MFA authentication. If you do not supply a correct
MFA code, then the API returns an access denied error. For a comparison of GetSessionToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
sts:GetSessionToken operation is to authenticate the user using MFA.
You cannot use policies to control authentication operations. For more information,
see Permissions
for GetSessionToken in the IAM User Guide.
GetSessionToken operation must be called by using the long-term Amazon
Web Services security credentials of the Amazon Web Services account root user or
an IAM user. Credentials that are created by IAM users are valid for the duration
that you specify. This duration can range from 900 seconds (15 minutes) up to a maximum
of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials
based on account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
(1 hour), with a default of 1 hour.
GetSessionToken can be
used to make API calls to any Amazon Web Services service with the following exceptions:
AssumeRole or GetCallerIdentity.
GetSessionToken with Amazon Web Services
account root user credentials. Instead, follow our best
practices by creating one or more IAM users, giving them the necessary permissions,
and using IAM users for everyday interaction with Amazon Web Services.
GetSessionToken are based on permissions
associated with the user whose credentials were used to call the operation. If GetSessionToken
is called using Amazon Web Services account root user credentials, the temporary credentials
have root user permissions. Similarly, if GetSessionToken is called using
the credentials of an IAM user, the temporary credentials have the same permissions
as the IAM user.
GetSessionToken to create temporary
credentials, go to Temporary
Credentials for Users in Untrusted Environments in the IAM User Guide.
GetSessionToken if you want to use MFA to protect
programmatic calls to specific Amazon Web Services API operations like Amazon EC2
StopInstances. MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA code that is associated with their MFA device. Using the temporary
security credentials that are returned from the call, IAM users can then make programmatic
calls to API operations that require MFA authentication. If you do not supply a correct
MFA code, then the API returns an access denied error. For a comparison of GetSessionToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
sts:GetSessionToken operation is to authenticate the user using MFA.
You cannot use policies to control authentication operations. For more information,
see Permissions
for GetSessionToken in the IAM User Guide.
GetSessionToken operation must be called by using the long-term Amazon
Web Services security credentials of the Amazon Web Services account root user or
an IAM user. Credentials that are created by IAM users are valid for the duration
that you specify. This duration can range from 900 seconds (15 minutes) up to a maximum
of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials
based on account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
(1 hour), with a default of 1 hour.
GetSessionToken can be
used to make API calls to any Amazon Web Services service with the following exceptions:
AssumeRole or GetCallerIdentity.
GetSessionToken with Amazon Web Services
account root user credentials. Instead, follow our best
practices by creating one or more IAM users, giving them the necessary permissions,
and using IAM users for everyday interaction with Amazon Web Services.
GetSessionToken are based on permissions
associated with the user whose credentials were used to call the operation. If GetSessionToken
is called using Amazon Web Services account root user credentials, the temporary credentials
have root user permissions. Similarly, if GetSessionToken is called using
the credentials of an IAM user, the temporary credentials have the same permissions
as the IAM user.
GetSessionToken to create temporary
credentials, go to Temporary
Credentials for Users in Untrusted Environments in the IAM User Guide.
AssumeRole within your account or for cross-account
access. For a comparison of AssumeRole with other API operations that
produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRole can be used
to make API calls to any Amazon Web Services service with the following exception:
You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
API operations.
AssumeRole for the ARN of the role
in the other account.
AssumeRole (as
long as the role's trust policy trusts the account).
AssumeRole. This is useful for cross-account scenarios to ensure
that the user that assumes the role has been authenticated with an Amazon Web Services
MFA device. In that scenario, the trust policy of the role being assumed includes
a condition that tests for MFA authentication. If the caller does not include valid
MFA information, the request to assume the role is denied. The condition in a trust
policy that tests for MFA authentication might look like the following example.
"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
AssumeRole, you pass values for the SerialNumber
and TokenCode parameters. The SerialNumber value identifies
the user's hardware or virtual MFA device. The TokenCode is the time-based
one-time password (TOTP) that the MFA device produces.
AssumeRoleWithSAML
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithSAML
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. Your role session lasts for the
duration that you specify, or until the time specified in the SAML authentication
response's SessionNotOnOrAfter value, whichever is shorter. You can provide
a DurationSeconds value from 900 seconds (15 minutes) up to the maximum
session duration setting for the role. This setting can have a value from 1 hour to
12 hours. To learn how to view the maximum value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRole API operation to assume a role,
you can specify the duration of your role session with the DurationSeconds
parameter. You can specify a parameter value of up to 43200 seconds (12 hours), depending
on the maximum session duration setting for your role. However, if you assume a role
using role chaining and provide a DurationSeconds parameter value greater
than one hour, the operation fails.
AssumeRoleWithSAML can
be used to make API calls to any Amazon Web Services service with the following exception:
you cannot call the STS GetFederationToken or GetSessionToken
API operations.
AssumeRoleWithSAML does not require the use of Amazon Web Services
security credentials. The identity of the caller is validated by using keys in the
metadata document that is uploaded for the SAML provider entity for your identity
provider.
AssumeRoleWithSAML can result in an entry in your CloudTrail
logs. The entry includes the value in the NameID element of the SAML
assertion. We recommend that you use a NameIDType that is not associated
with any personally identifiable information (PII). For example, you could instead
use the persistent identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithSAML, you must configure
your SAML identity provider (IdP) to issue the claims required by Amazon Web Services.
Additionally, you must use Identity and Access Management (IAM) to create a SAML provider
entity in your Amazon Web Services account that represents your identity provider.
You must also create an IAM role that specifies this SAML provider in its trust policy.
AssumeRoleWithWebIdentity operation,
it can also mean that the claim has expired or has been explicitly revoked.
AssumeRoleWithWebIdentity does not require the use of Amazon
Web Services security credentials. Therefore, you can distribute an application (for
example, on mobile devices) that requests temporary security credentials without including
long-term Amazon Web Services credentials in the application. You also don't need
to deploy server-based proxy services that use long-term Amazon Web Services credentials.
Instead, the identity of the caller is validated by using a token from the web identity
provider. For a comparison of AssumeRoleWithWebIdentity with the other
API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. You can provide a value from 900
seconds (15 minutes) up to the maximum session duration setting for the role. This
setting can have a value from 1 hour to 12 hours. To learn how to view the maximum
value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRoleWithWebIdentity
can be used to make API calls to any Amazon Web Services service with the following
exception: you cannot call the STS GetFederationToken or GetSessionToken
API operations.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithWebIdentity, you must
have an identity token from a supported identity provider and create a role that the
application can assume. The role that your application assumes must trust the identity
provider that is associated with the identity token. In other words, the identity
provider must be specified in the role's trust policy.
AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
logs. The entry includes the Subject
of the provided web identity token. We recommend that you avoid using any personally
identifiable information (PII) in this field. For example, you could instead use a
GUID or a pairwise identifier, as suggested
in the OIDC specification.
AssumeRoleWithWebIdentity
API, see the following resources:
AssumeRoleWithWebIdentity operation,
it can also mean that the claim has expired or has been explicitly revoked.
Client.UnauthorizedOperation response
(an HTTP 403 response). Some Amazon Web Services operations additionally return an
encoded message that can provide details about this authorization failure.
DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
action.
DecodeAuthorizationMessage
was invalid. This can happen if the token contains invalid characters, such as linebreaks.
AKIAIOSFODNN7EXAMPLE)
and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).
For more information about access keys, see Managing
Access Keys for IAM Users in the IAM User Guide.
AKIA
are long-term credentials for an IAM user or the Amazon Web Services account root
user. Access key IDs beginning with ASIA are temporary credentials that
are created using STS operations. If the account in the response belongs to you, you
can sign in as the root user and review your root user access keys. Then, you can
pull a credentials
report to learn which IAM user owns the keys. To learn who requested the temporary
credentials for an ASIA access key, view the STS events in your CloudTrail
logs in the IAM User Guide.
sts:GetCallerIdentity
action, you can still perform this operation. Permissions are not required because
the same information is returned when an IAM user or role is denied access. To view
an example response, see I
Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the IAM User Guide.
GetFederationToken
operation using the long-term security credentials of an IAM user. As a result, this
call is appropriate in contexts where those credentials can be safely stored, usually
in a server-based application. For a comparison of GetFederationToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
GetFederationToken using the security credentials of
an Amazon Web Services account root user, but we do not recommend it. Instead, we
recommend that you create an IAM user for the purpose of the proxy application. Then
attach a policy to the IAM user that limits federated users to only the actions and
resources that they need to access. For more information, see IAM
Best Practices in the IAM User Guide.
GetFederationToken in
any Amazon Web Services service except the following:
GetCallerIdentity.
GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation
Through a Custom Identity Broker.
Principal
element of the policy, the session has the permissions allowed by the policy. These
permissions are granted in addition to the permissions granted by the session policies.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
Department and department tag keys.
Assume that the user that you are federating has the Department=Marketing
tag and you pass the department=engineering session tag.
Department and department are not saved as separate tags,
and the session tag passed in the request takes precedence over the user tag.
GetSessionToken if you want to use MFA to protect
programmatic calls to specific Amazon Web Services API operations like Amazon EC2
StopInstances. MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA code that is associated with their MFA device. Using the temporary
security credentials that are returned from the call, IAM users can then make programmatic
calls to API operations that require MFA authentication. If you do not supply a correct
MFA code, then the API returns an access denied error. For a comparison of GetSessionToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
sts:GetSessionToken operation is to authenticate the user using MFA.
You cannot use policies to control authentication operations. For more information,
see Permissions
for GetSessionToken in the IAM User Guide.
GetSessionToken operation must be called by using the long-term Amazon
Web Services security credentials of the Amazon Web Services account root user or
an IAM user. Credentials that are created by IAM users are valid for the duration
that you specify. This duration can range from 900 seconds (15 minutes) up to a maximum
of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials
based on account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
(1 hour), with a default of 1 hour.
GetSessionToken can be
used to make API calls to any Amazon Web Services service with the following exceptions:
AssumeRole or GetCallerIdentity.
GetSessionToken with Amazon Web Services
account root user credentials. Instead, follow our best
practices by creating one or more IAM users, giving them the necessary permissions,
and using IAM users for everyday interaction with Amazon Web Services.
GetSessionToken are based on permissions
associated with the user whose credentials were used to call the operation. If GetSessionToken
is called using Amazon Web Services account root user credentials, the temporary credentials
have root user permissions. Similarly, if GetSessionToken is called using
the credentials of an IAM user, the temporary credentials have the same permissions
as the IAM user.
GetSessionToken to create temporary
credentials, go to Temporary
Credentials for Users in Untrusted Environments in the IAM User Guide.
GetSessionToken if you want to use MFA to protect
programmatic calls to specific Amazon Web Services API operations like Amazon EC2
StopInstances. MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA code that is associated with their MFA device. Using the temporary
security credentials that are returned from the call, IAM users can then make programmatic
calls to API operations that require MFA authentication. If you do not supply a correct
MFA code, then the API returns an access denied error. For a comparison of GetSessionToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
sts:GetSessionToken operation is to authenticate the user using MFA.
You cannot use policies to control authentication operations. For more information,
see Permissions
for GetSessionToken in the IAM User Guide.
GetSessionToken operation must be called by using the long-term Amazon
Web Services security credentials of the Amazon Web Services account root user or
an IAM user. Credentials that are created by IAM users are valid for the duration
that you specify. This duration can range from 900 seconds (15 minutes) up to a maximum
of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials
based on account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
(1 hour), with a default of 1 hour.
GetSessionToken can be
used to make API calls to any Amazon Web Services service with the following exceptions:
AssumeRole or GetCallerIdentity.
GetSessionToken with Amazon Web Services
account root user credentials. Instead, follow our best
practices by creating one or more IAM users, giving them the necessary permissions,
and using IAM users for everyday interaction with Amazon Web Services.
GetSessionToken are based on permissions
associated with the user whose credentials were used to call the operation. If GetSessionToken
is called using Amazon Web Services account root user credentials, the temporary credentials
have root user permissions. Similarly, if GetSessionToken is called using
the credentials of an IAM user, the temporary credentials have the same permissions
as the IAM user.
GetSessionToken to create temporary
credentials, go to Temporary
Credentials for Users in Untrusted Environments in the IAM User Guide.
AssumeRole within your account or for cross-account
access. For a comparison of AssumeRole with other API operations that
produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRole can be used
to make API calls to any Amazon Web Services service with the following exception:
You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
API operations.
AssumeRole for the ARN of the role
in the other account.
AssumeRole (as
long as the role's trust policy trusts the account).
AssumeRole. This is useful for cross-account scenarios to ensure
that the user that assumes the role has been authenticated with an Amazon Web Services
MFA device. In that scenario, the trust policy of the role being assumed includes
a condition that tests for MFA authentication. If the caller does not include valid
MFA information, the request to assume the role is denied. The condition in a trust
policy that tests for MFA authentication might look like the following example.
"Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
AssumeRole, you pass values for the SerialNumber
and TokenCode parameters. The SerialNumber value identifies
the user's hardware or virtual MFA device. The TokenCode is the time-based
one-time password (TOTP) that the MFA device produces.
AssumeRole API operation
to assume a role, you can specify the duration of your role session with the DurationSeconds
parameter. You can specify a parameter value of up to 43200 seconds (12 hours), depending
on the maximum session duration setting for your role. However, if you assume a role
using role chaining and provide a DurationSeconds parameter value greater
than one hour, the operation fails. To learn how to view the maximum value for your
role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
3600 seconds.
DurationSeconds parameter is separate from the duration of a console
session that you might request using the returned credentials. The request to the
federation endpoint for a console sign-in token takes a SessionDuration
parameter that specifies the maximum length of the console session. For more information,
see Creating
a URL that Enables Federated Users to Access the Amazon Web Services Management Console
in the IAM User Guide.
ExternalId parameter. This
value can be any string, such as a passphrase or account number. A cross-account role
is usually set up to trust everyone in an account. Therefore, the administrator of
the trusting account might send an external ID to the administrator of the trusted
account. That way, only someone with the ID can assume the role, rather than everyone
in the account. For more information about the external ID, see How
to Use an External ID When Granting Access to Your Amazon Web Services Resources to
a Third Party in the IAM User Guide.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRole call. Specify this value if the trust policy of
the role being assumed includes a condition that requires MFA authentication. The
value is either the serial number for a hardware device (such as GAHT12345678)
or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
AssumeRole
operation.
sts:SourceIdentity condition key in a role trust policy.
You can use source identity information in CloudTrail logs to determine who took actions
with a role. You can use the aws:SourceIdentity condition key to further
control access to Amazon Web Services resources based on the value of source identity.
For more information about using source identity, see Monitor
and control actions taken with assumed roles in the IAM User Guide.
aws:. This prefix is reserved for Amazon Web Services
internal use.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
Department and department tag keys.
Assume that the role has the Department=Marketing tag and
you pass the department=engineering session tag. Department
and department are not saved as separate tags, and the session tag passed
in the request takes precedence over the role tag.
TokenCode value is
missing or expired, the AssumeRole call returns an "access denied" error.
RoleSessionName
that you specified when you called AssumeRole.
AssumeRole
operation.
sts:SourceIdentity condition key in a role trust policy.
You can use source identity information in CloudTrail logs to determine who took actions
with a role. You can use the aws:SourceIdentity condition key to further
control access to Amazon Web Services resources based on the value of source identity.
For more information about using source identity, see Monitor
and control actions taken with assumed roles in the IAM User Guide.
AssumeRoleWithSAML
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithSAML
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. Your role session lasts for the
duration that you specify, or until the time specified in the SAML authentication
response's SessionNotOnOrAfter value, whichever is shorter. You can provide
a DurationSeconds value from 900 seconds (15 minutes) up to the maximum
session duration setting for the role. This setting can have a value from 1 hour to
12 hours. To learn how to view the maximum value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRole API operation to assume a role,
you can specify the duration of your role session with the DurationSeconds
parameter. You can specify a parameter value of up to 43200 seconds (12 hours), depending
on the maximum session duration setting for your role. However, if you assume a role
using role chaining and provide a DurationSeconds parameter value greater
than one hour, the operation fails.
AssumeRoleWithSAML can
be used to make API calls to any Amazon Web Services service with the following exception:
you cannot call the STS GetFederationToken or GetSessionToken
API operations.
AssumeRoleWithSAML does not require the use of Amazon Web Services
security credentials. The identity of the caller is validated by using keys in the
metadata document that is uploaded for the SAML provider entity for your identity
provider.
AssumeRoleWithSAML can result in an entry in your CloudTrail
logs. The entry includes the value in the NameID element of the SAML
assertion. We recommend that you use a NameIDType that is not associated
with any personally identifiable information (PII). For example, you could instead
use the persistent identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithSAML, you must configure
your SAML identity provider (IdP) to issue the claims required by Amazon Web Services.
Additionally, you must use Identity and Access Management (IAM) to create a SAML provider
entity in your Amazon Web Services account that represents your identity provider.
You must also create an IAM role that specifies this SAML provider in its trust policy.
DurationSeconds parameter, or until the time
specified in the SAML authentication response's SessionNotOnOrAfter value,
whichever is shorter. You can provide a DurationSeconds value from 900
seconds (15 minutes) up to the maximum session duration setting for the role. This
setting can have a value from 1 hour to 12 hours. If you specify a value higher than
this setting, the operation fails. For example, if you specify a session duration
of 12 hours, but your administrator set the maximum session duration to 6 hours, your
operation fails. To learn how to view the maximum value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
3600 seconds.
DurationSeconds parameter is separate from the duration of a console
session that you might request using the returned credentials. The request to the
federation endpoint for a console sign-in token takes a SessionDuration
parameter that specifies the maximum length of the console session. For more information,
see Creating
a URL that Enables Federated Users to Access the Amazon Web Services Management Console
in the IAM User Guide.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
Recipient attribute of the SubjectConfirmationData
element of the SAML assertion.
Issuer element of the SAML assertion.
Issuer response value.
NameQualifier and Subject can be used
to uniquely identify a federated user.
BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP"
) )
SourceIdentity attribute in the SAML assertion.
sts:SourceIdentity condition key in a role trust
policy. That way, actions that are taken with the role are associated with that user.
After the source identity is set, the value cannot be changed. It is present in the
request for all actions that are taken by the role and persists across chained
role sessions. You can configure your SAML identity provider to use an attribute
associated with your users, like user name or email, as the source identity when calling
AssumeRoleWithSAML. You do this by adding an attribute to the SAML assertion.
For more information about using source identity, see Monitor
and control actions taken with assumed roles in the IAM User Guide.
NameID element in the Subject element of
the SAML assertion.
Format attribute in the
NameID element of the SAML assertion. Typical examples of the format
are transient or persistent.
urn:oasis:names:tc:SAML:2.0:nameid-format,
that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient
is returned as transient. If the format includes any other prefix, the
format is returned with no modifications.
AssumeRoleWithWebIdentity does not require the use of Amazon
Web Services security credentials. Therefore, you can distribute an application (for
example, on mobile devices) that requests temporary security credentials without including
long-term Amazon Web Services credentials in the application. You also don't need
to deploy server-based proxy services that use long-term Amazon Web Services credentials.
Instead, the identity of the caller is validated by using a token from the web identity
provider. For a comparison of AssumeRoleWithWebIdentity with the other
API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity
last for one hour. However, you can use the optional DurationSeconds
parameter to specify the duration of your session. You can provide a value from 900
seconds (15 minutes) up to the maximum session duration setting for the role. This
setting can have a value from 1 hour to 12 hours. To learn how to view the maximum
value for your role, see View
the Maximum Session Duration Setting for a Role in the IAM User Guide.
The maximum session duration limit applies when you use the AssumeRole*
API operations or the assume-role* CLI commands. However the limit does
not apply when you use those operations to create a console URL. For more information,
see Using
IAM Roles in the IAM User Guide.
AssumeRoleWithWebIdentity
can be used to make API calls to any Amazon Web Services service with the following
exception: you cannot call the STS GetFederationToken or GetSessionToken
API operations.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
AssumeRoleWithWebIdentity, you must
have an identity token from a supported identity provider and create a role that the
application can assume. The role that your application assumes must trust the identity
provider that is associated with the identity token. In other words, the identity
provider must be specified in the role's trust policy.
AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
logs. The entry includes the Subject
of the provided web identity token. We recommend that you avoid using any personally
identifiable information (PII) in this field. For example, you could instead use a
GUID or a pairwise identifier, as suggested
in the OIDC specification.
AssumeRoleWithWebIdentity
API, see the following resources:
3600 seconds.
DurationSeconds parameter is separate from the duration of a console
session that you might request using the returned credentials. The request to the
federation endpoint for a console sign-in token takes a SessionDuration
parameter that specifies the maximum length of the console session. For more information,
see Creating
a URL that Enables Federated Users to Access the Amazon Web Services Management Console
in the IAM User Guide.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
www.amazon.com and graph.facebook.com are the
only supported identity providers for OAuth 2.0 access tokens. Do not include URL
schemes and port numbers.
AssumedRoleUser
response element.
AssumeRoleWithWebIdentity
call.
RoleSessionName
that you specified when you called AssumeRole.
iss field. For OAuth 2.0 access
tokens, this contains the value of the ProviderId parameter that was
passed in the AssumeRoleWithWebIdentity request.
sts:SourceIdentity condition key in a role trust
policy. That way, actions that are taken with the role are associated with that user.
After the source identity is set, the value cannot be changed. It is present in the
request for all actions that are taken by the role and persists across chained
role sessions. You can configure your identity provider to use an attribute associated
with your users, like user name or email, as the source identity when calling AssumeRoleWithWebIdentity.
You do this by adding a claim to the JSON web token. To learn more about OIDC tokens
and claims, see Using
Tokens with User Pools in the Amazon Cognito Developer Guide. For more
information about using source identity, see Monitor
and control actions taken with assumed roles in the IAM User Guide.
WebIdentityToken that was submitted with the AssumeRoleWithWebIdentity
call. The identifier is typically unique to the user and the application that acquired
the WebIdentityToken (pairwise identifier). For OpenID Connect ID tokens,
this field contains the value returned by the identity provider as the token's sub
(Subject) claim.
Client.UnauthorizedOperation response
(an HTTP 403 response). Some Amazon Web Services operations additionally return an
encoded message that can provide details about this authorization failure.
DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
action.
AKIAIOSFODNN7EXAMPLE)
and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).
For more information about access keys, see Managing
Access Keys for IAM Users in the IAM User Guide.
AKIA
are long-term credentials for an IAM user or the Amazon Web Services account root
user. Access key IDs beginning with ASIA are temporary credentials that
are created using STS operations. If the account in the response belongs to you, you
can sign in as the root user and review your root user access keys. Then, you can
pull a credentials
report to learn which IAM user owns the keys. To learn who requested the temporary
credentials for an ASIA access key, view the STS events in your CloudTrail
logs in the IAM User Guide.
sts:GetCallerIdentity
action, you can still perform this operation. Permissions are not required because
the same information is returned when an IAM user or role is denied access. To view
an example response, see I
Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the IAM User Guide.
GetFederationToken
operation using the long-term security credentials of an IAM user. As a result, this
call is appropriate in contexts where those credentials can be safely stored, usually
in a server-based application. For a comparison of GetFederationToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
GetFederationToken using the security credentials of
an Amazon Web Services account root user, but we do not recommend it. Instead, we
recommend that you create an IAM user for the purpose of the proxy application. Then
attach a policy to the IAM user that limits federated users to only the actions and
resources that they need to access. For more information, see IAM
Best Practices in the IAM User Guide.
GetFederationToken in
any Amazon Web Services service except the following:
GetCallerIdentity.
GetFederationToken
to create temporary security credentials, see GetFederationToken—Federation
Through a Custom Identity Broker.
Principal
element of the policy, the session has the permissions allowed by the policy. These
permissions are granted in addition to the permissions granted by the session policies.
AssumeRoleWithWebIdentity. For more information, see Federation
Through a Web-based Identity Provider in the IAM User Guide.
Department and department tag keys.
Assume that the user that you are federating has the Department=Marketing
tag and you pass the department=engineering session tag.
Department and department are not saved as separate tags,
and the session tag passed in the request takes precedence over the user tag.
Bob). For example, you can reference the federated user name in a resource-based policy, such as in an Amazon S3 bucket policy. The regex used to validate this parameter is a string of characters consisting of upper- and lower-case alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@-
Bob). For example, you can reference the
federated user name in a resource-based policy, such as in an Amazon S3 bucket policy.
Principal
element of the policy, the session has the permissions allowed by the policy. These
permissions are granted in addition to the permissions that are granted by the session
policies.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
Principal
element of the policy, the session has the permissions allowed by the policy. These
permissions are granted in addition to the permissions that are granted by the session
policies.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
PackedPolicySize
response element indicates by percentage how close the policies and tags for your
request are to the upper size limit.
Department and department tag keys.
Assume that the role has the Department=Marketing tag and
you pass the department=engineering session tag. Department
and department are not saved as separate tags, and the session tag passed
in the request takes precedence over the role tag.
arn:aws:sts::123456789012:federated-user/Bob
or 123456789012:Bob). You can use the federated user's ARN in your resource-based
policies, such as an Amazon S3 bucket policy.
GetSessionToken if you want to use MFA to protect
programmatic calls to specific Amazon Web Services API operations like Amazon EC2
StopInstances. MFA-enabled IAM users would need to call GetSessionToken
and submit an MFA code that is associated with their MFA device. Using the temporary
security credentials that are returned from the call, IAM users can then make programmatic
calls to API operations that require MFA authentication. If you do not supply a correct
MFA code, then the API returns an access denied error. For a comparison of GetSessionToken
with the other API operations that produce temporary credentials, see Requesting
Temporary Security Credentials and Comparing
the Amazon Web Services STS API operations in the IAM User Guide.
sts:GetSessionToken operation is to authenticate the user using MFA.
You cannot use policies to control authentication operations. For more information,
see Permissions
for GetSessionToken in the IAM User Guide.
GetSessionToken operation must be called by using the long-term Amazon
Web Services security credentials of the Amazon Web Services account root user or
an IAM user. Credentials that are created by IAM users are valid for the duration
that you specify. This duration can range from 900 seconds (15 minutes) up to a maximum
of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials
based on account credentials can range from 900 seconds (15 minutes) up to 3,600 seconds
(1 hour), with a default of 1 hour.
GetSessionToken can be
used to make API calls to any Amazon Web Services service with the following exceptions:
AssumeRole or GetCallerIdentity.
GetSessionToken with Amazon Web Services
account root user credentials. Instead, follow our best
practices by creating one or more IAM users, giving them the necessary permissions,
and using IAM users for everyday interaction with Amazon Web Services.
GetSessionToken are based on permissions
associated with the user whose credentials were used to call the operation. If GetSessionToken
is called using Amazon Web Services account root user credentials, the temporary credentials
have root user permissions. Similarly, if GetSessionToken is called using
the credentials of an IAM user, the temporary credentials have the same permissions
as the IAM user.
GetSessionToken to create temporary
credentials, go to Temporary
Credentials for Users in Untrusted Environments in the IAM User Guide.
GetSessionToken call. Specify this value if the IAM user
has a policy that requires MFA authentication. The value is either the serial number
for a hardware device (such as GAHT12345678) or an Amazon Resource Name
(ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
You can find the device for an IAM user by going to the Amazon Web Services Management
Console and viewing the user's security credentials.
AssumeRoleWithWebIdentity operation,
it can also mean that the claim has expired or has been explicitly revoked.
DecodeAuthorizationMessage
was invalid. This can happen if the token contains invalid characters, such as linebreaks.
The STANDARD mode provides the latest recommended default values that should be safe to run in most scenarios
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
The IN_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services from within the same AWS region
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
The CROSS_REGION mode builds on the standard mode and includes optimization tailored for applications which call AWS services in a different region
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
The MOBILE mode builds on the standard mode and includes optimization tailored for mobile applications
Note that the default values vended from this mode might change as best practices may evolve. As a result, it is encouraged to perform tests when upgrading the SDK
The AUTO mode is an experimental mode that builds on the standard mode. The SDK will attempt to discover the execution environment to determine the appropriate settings automatically.
Note that the auto detection is heuristics-based and does not guarantee 100% accuracy. STANDARD mode will be used if the execution environment cannot be determined. The auto detection might query EC2 Instance Metadata service, which might introduce latency. Therefore we recommend choosing an explicit defaults_mode instead if startup latency is critical to your application
The LEGACY mode provides default settings that vary per SDK and were used prior to establishment of defaults_mode