Complete the code to create an S3 bucket named 'my-bucket'.
aws s3api create-bucket --bucket [1] --region us-east-1
The --bucket option specifies the name of the S3 bucket to create. Here, 'my-bucket' is the correct bucket name.
Complete the code to specify the region 'us-west-2' when creating the bucket.
aws s3api create-bucket --bucket my-bucket --region [1] --create-bucket-configuration LocationConstraint=[1]
The --region option sets the AWS region where the bucket will be created. 'us-west-2' is the correct region here.
Fix the error in the command to create a bucket with public read access.
aws s3api create-bucket --bucket my-bucket --acl [1]The --acl public-read option allows public read access to the bucket. This is the correct setting for public read access.
Fill both blanks to create a bucket named 'versioned-bucket' in region 'eu-west-1'.
aws s3api create-bucket --bucket [1] --region [2] --create-bucket-configuration LocationConstraint=[2]
The bucket name is 'versioned-bucket' and the region is 'eu-west-1'. The LocationConstraint must match the region.
Fill all three blanks to enable versioning on an existing bucket named 'archive-bucket' in region 'ap-northeast-1'.
aws s3api put-bucket-versioning --bucket [1] --region [2] --versioning-configuration Status=[3]
To enable versioning, specify the bucket name 'archive-bucket', the region 'ap-northeast-1', and set Status to 'Enabled'.