BaşlayınÜcretsiz Başlayın

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.

Bu egzersiz

Streaming Data with AWS Kinesis and Lambda

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • 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".

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# 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)
Kodu Düzenle ve Çalıştır