Skip to content

Instantly share code, notes, and snippets.

@gene1wood
gene1wood / GET-STS-SESSION.md
Last active October 15, 2023 22:45
Tool to create ephemeral awscli/boto config/credentials files for creating a long lasting (36 hour) cached MFA and child assumed role

Setup

SOURCE_PROFILE_NAME

If the AWS API key and secret which you use and and are stored in ~/.aws/credentials in a profile called default then you don't need to set the SOURCE_PROFILE_NAME in the code. If the profile name in ~/.aws/credentials is something other than default then set SOURCE_PROFILE_NAME to that name. For example if your ~/.aws/credentials looked like this