Created
March 9, 2022 20:24
-
-
Save aaronwolen/08f1ca80b2d83924ada118205def5956 to your computer and use it in GitHub Desktop.
retrieve-aws-credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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