boto3.client
AWS_ACCESS_KEY_ID ="[access_key]"
AWS_SECRET_ACCESS_KEY = "[secret_key]"
AWS_DEFAULT_REGION = "ap-northeast-2"
client = boto3.client('s3')
session
session = boto3.Session(
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
region_name=AWS_DEFAULT_REGION
)
s3 = session.resource('s3')
bucket
AWS_BUCKET_NAME = "bucketname"
buckets = s3.Bucket(name=AWS_BUCKET_NAME)
object
AWS_BUCKET_NAME = "aws-go-testserver"
object_key = "file.pdf"
s3 = boto3.resource('s3')
object_ = s3.Object(AWS_BUCKET_NAME, object_key)