S3 bucket creation
Amazon's ARNs or Amazon Resource Names for buckets follow a specific format. Let's practice generating ARNs for various S3 buckets.
The S3 client has been created and stored in the s3 variable.
Questo esercizio fa parte del corso
Streaming Data with AWS Kinesis and Lambda
Istruzioni dell'esercizio
- Create the new
"sd-vehicle-data"bucket. - List the buckets available in S3.
- Generate the ARN for each bucket and print it. Remember that S3 ARNs follow the format of
"arn:aws:s3:::BUCKET_NAME".
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Create the new sd-vehicle-data bucket
s3.____(Bucket='sd-vehicle-data')
# List the buckets in S3
for bucket_info in s3.____()['Buckets']:
# Get the bucket_name
bucket_name = bucket_info['Name']
# Generate bucket ARN.
arn = "____:____:____:::{}".format(bucket_name)
# Print the ARN
print(arn)