Obtaining temporary security credentials from AWS Identity and Access Management Roles Anywhere - IAM Roles Anywhere

Obtaining temporary security credentials from AWS Identity and Access Management Roles Anywhere

To obtain temporary security credentials from AWS Identity and Access Management Roles Anywhere, use the credential helper tool that IAM Roles Anywhere provides. This tool is compatible with the credential_process feature available across the language SDKs. The helper manages the process of creating a signature with the certificate and calling the endpoint to obtain session credentials; it returns the credentials to the calling process in a standard JSON format. See Temporary security credentials in IAM for more information on session credentials.

To download the credential helper tool, use the following links.

Platform Download URL SHA256 checksum










Before you can obtain temporary credentials, you must have both an end-entity certificate from the certificate authority and a trust anchor in IAM Roles Anywhere. For more information, see Creating a trust anchor and profile.


./aws_signing_helper credential-process \ --certificate [--endpoint] [--region] [--intermediates] --private-key --profile-arn --role-arn [--session-duration] --trust-anchor-arn [--with-proxy] [--no-verify-ssl]


--certificate (string)

Path to certificate file

--endpoint (string)

The IAM Roles Anywhere endpoint for the region. For a list of endpoints, see Service endpoints and quotas.

--region (string)

Signing region.

--intermediates (string)

Path to intermediate certificate bundle.

--private-key (string)

Path to private key file.

--profile-arn (string)

Profile to to pull policies from.

--role-arn (string)

Target role to assume.

--session-duration (int)

Duration, in seconds, for the resulting session (default 3600).

--trust-anchor-arn (string)

Trust anchor to to use for authentication.


To use credential-process with a proxy.


To disable SSL verification.


Note that this disables TLS host authentication, and can open the connection to man-in-the-middle attacks. This option should only be used under specific, tightly controlled scenarios, such as debugging proxy connections.


The credential helper tool will return a JSON containing the credentials. This format allows the credentials to be consumed by the external credential process supported by the credential_process.

{ "Version":1, "AccessKeyId": String, "SecretAccessKey": String, "SessionToken": String, "Expiration": Timestamp }


Example Obtain temporary security credentials

To obtain temporary security credentials, use the following command.

$ ./aws_signing_helper credential-process \ --certificate /path/to/certificate \ --private-key /path/to/private-key \ --trust-anchor-arn arn:aws:rolesanywhere:region:account:trust-anchor/TA_ID \ --profile-arn arn:aws:rolesanywhere:region:account:profile/PROFILE_ID \ --role-arn arn:aws:iam::account:role/role-name-with-path

Example Use temporary security credentials with AWS SDKs and the AWS CLI

To use temporary security credentials with AWS SDKs and the AWS CLI, you can configure the credential helper tool as a credential process. For more information, see Sourcing credentials with an external process.

The following example shows a the config file that sets the helper tool as the credential process.

[profile developer] credential_process = ./aws_signing_helper credential-process --certificate /path/to/certificate --private-key /path/to/private-key --trust-anchor-arn arn:aws:rolesanywhere:region:account:trust-anchor/TA_ID --profile-arn arn:aws:rolesanywhere:region:account:profile/PROFILE_ID --role-arn arn:aws:iam::account:role/role-name-with-path

Credential Helper version 1.0.1

On July 14, 2022, AWS IAM Roles Anywhere released Credential Helper version 1.0.1. As a part of this release, the tool now has better error handling.