Skip to content

Instantly share code, notes, and snippets.

@aaronwolen
Created March 9, 2022 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronwolen/08f1ca80b2d83924ada118205def5956 to your computer and use it in GitHub Desktop.
Save aaronwolen/08f1ca80b2d83924ada118205def5956 to your computer and use it in GitHub Desktop.
retrieve-aws-credentials
# access aws credentials for a profile from ~/.aws/credentials
import boto3
profile = 'default'
session = boto3.Session(profile_name=profile)
credentials = session.get_credentials()
credentials.access_key
credentials.secret_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment