0
0
AWScloud~10 mins

S3 versioning in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable versioning on an S3 bucket using AWS CLI.

AWS
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=[1]
Drag options to blanks, or click blank then click option'
AActive
BDisabled
CSuspended
DEnabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Disabled' instead of 'Enabled'
Using 'Suspended' which pauses versioning but does not enable it
2fill in blank
medium

Complete the AWS CLI command to check the versioning status of a bucket.

AWS
aws s3api get-bucket-versioning --bucket [1]
Drag options to blanks, or click blank then click option'
Amy-bucket
Bexample-bucket
Ctest-bucket
Dbucket-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using a bucket name that was not created or does not exist
Leaving the bucket name blank
3fill in blank
hard

Fix the error in the JSON configuration to enable versioning in a CloudFormation template.

AWS
"VersioningConfiguration": {"Status": "[1]"}
Drag options to blanks, or click blank then click option'
ASuspended
BActive
CEnabled
DDisabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Active' which is not a valid status
Using 'Suspended' which pauses versioning
4fill in blank
hard

Fill both blanks to create a Python boto3 snippet that enables versioning on a bucket.

AWS
s3 = boto3.client('s3')
s3.put_bucket_versioning(Bucket='my-bucket', VersioningConfiguration={'[1]': '[2]'})
Drag options to blanks, or click blank then click option'
AStatus
BVersioning
CEnabled
DActive
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Versioning' as the key instead of 'Status'
Using 'Active' instead of 'Enabled' as the value
5fill in blank
hard

Fill all three blanks to write a Terraform resource block that enables versioning on an S3 bucket.

AWS
resource "aws_s3_bucket" "my_bucket" {
  bucket = "my-bucket"

  versioning {
    [1] = [2]
    [3] = false
  }
}
Drag options to blanks, or click blank then click option'
Aenabled
Btrue
Cmfa_delete
Dversioning
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'versioning' as an attribute inside the versioning block
Setting 'enabled' to false
Confusing 'mfa_delete' with 'enabled'