Skip to content

Instantly share code, notes, and snippets.

@anuragmathur1
Created August 22, 2017 04:47
Show Gist options
  • Save anuragmathur1/e443194f2a47abf3d1c5c439b12eadd6 to your computer and use it in GitHub Desktop.
Save anuragmathur1/e443194f2a47abf3d1c5c439b12eadd6 to your computer and use it in GitHub Desktop.
Get the AWS account number that you are currently operating with.
import boto3
account_number = boto3.client('sts').get_caller_identity()['Account']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment