Skip to content

Instantly share code, notes, and snippets.

@gbhorwood
Created May 6, 2019 21:16
Show Gist options
  • Save gbhorwood/a0c674364bb21ba5590730505a55114e to your computer and use it in GitHub Desktop.
Save gbhorwood/a0c674364bb21ba5590730505a55114e to your computer and use it in GitHub Desktop.
create a boto3 client
# 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