Created
January 12, 2020 16:32
-
-
Save ashutoshkarna03/74aac49cf0ea731f47fb0dd3c99e4643 to your computer and use it in GitHub Desktop.
This file contains 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
import boto3 | |
from pprint import pprint | |
import dotenv | |
import os | |
# load the environment variables | |
dotenv.load_dotenv() | |
# create boto3 client for ec2 | |
client = boto3.client('ec2', | |
region_name=os.getenv('AWS_REGION'), | |
aws_access_key_id=os.getenv('AWS_ACCESS_KEY_ID'), | |
aws_secret_access_key=os.getenv('AWS_SECRET_ACCESS_KEY')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment