Your first boto3 client
Sam wants to cast off the shackles of only being able to use her computer for storage and compute. She is learning how to use the awesome power of the cloud to create data pipelines and automatically generate reports.
Before she can do all that, she needs to create her first boto3 client and check out what buckets already exist in S3.
Her AWS key and AWS secret key have been stored in AWS_KEY_ID and AWS_SECRET respectively.
In this exercise, you will help Sam by creating your first boto3 client to AWS!
Este ejercicio forma parte del curso
Introduction to AWS Boto in Python
Instrucciones del ejercicio
- Generate a
boto3client for interacting withs3. - Specify
'us-east-1'for theregion_name. - Use
AWS_KEY_IDandAWS_SECRETto set up the credentials. - Print the buckets.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Generate the boto3 client for interacting with S3
s3 = boto3.client('____', ____='us-east-1',
# Set up AWS credentials
aws_access_key_id=____,
aws_secret_access_key=____)
# List the buckets
buckets = s3.list_buckets()
# Print the buckets
print(buckets)