Created
May 6, 2019 21:16
-
-
Save gbhorwood/a0c674364bb21ba5590730505a55114e to your computer and use it in GitHub Desktop.
create a boto3 client
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 the boto modules | |
import botocore | |
import boto3 | |
# get our aws credentials from our .env file | |
aws_access_key_id = str(getDotEnv("ACCESS_KEY_ID")) | |
aws_secret_access_key = str(getDotEnv("SECRET_ACCESS_KEY")) | |
region_name = str(getDotEnv("REGION_NAME")) | |
# create the client of type 'rds-data' | |
client = boto3.client( | |
'rds-data', | |
aws_access_key_id=aws_access_key_id, | |
aws_secret_access_key=aws_secret_access_key, | |
region_name=region_name, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment