Skip to content

Instantly share code, notes, and snippets.

@ashutoshkarna03
Created May 18, 2020 17:40
Show Gist options
  • Save ashutoshkarna03/249cf4d6930191a23a8be0665c709da5 to your computer and use it in GitHub Desktop.
Save ashutoshkarna03/249cf4d6930191a23a8be0665c709da5 to your computer and use it in GitHub Desktop.
# create boto3 client for ec2 for both source and destination region
client_src = boto3.client('ec2', region_name=os.getenv('SOURCE_REGION'))
client_des = boto3.client('ec2', region_name=os.getenv('DESTINATION_REGION'))
# create ec2 resource
ec2 = boto3.resource('ec2', region_name=os.getenv('DESTINATION_REGION'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment