role_session_name - AWS SDKs and Tools Shared Configuration and Credentials

role_session_name

Specifies the name to attach to the role session. This name appears in AWS CloudTrail logs for entries associated with this session.

Details

Default value: An optional parameter. If you don't provide this value, a session name is generated automatically if the profile assumes a role.

Valid values: Provided to the RoleSessionName parameter when the AWS CLI calls the AssumeRole operation on your behalf. The value becomes part of the assumed role user Amazon Resource Name (ARN) that you can query, and shows up as part of the CloudTrail log entries for operations invoked by this profile.

arn:aws:sts::123456789012:assumed-role/my-role-name/my-role_session_name.

Ways to set this value

Location Supported Example
config file Yes
role_session_name = my-role-session-name
credentials file -
Environment variable -
CLI parameter -

Compatibility with AWS SDKS and tools