Skip to content

Instantly share code, notes, and snippets.

@amui
Last active January 22, 2025 23:04
Show Gist options
  • Select an option

  • Save amui/78ad569deec7849846eedf6b4a20bf40 to your computer and use it in GitHub Desktop.

Select an option

Save amui/78ad569deec7849846eedf6b4a20bf40 to your computer and use it in GitHub Desktop.
Get creds for current assumed role using boto3
python3 -c "import boto3; creds = boto3.Session().get_credentials().get_frozen_credentials(); print(f'AWS_ACCESS_KEY_ID={creds.access_key}\nAWS_SECRET_ACCESS_KEY={creds.secret_key}\nAWS_SESSION_TOKEN={creds.token}')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment