nerdexam
Amazon

SOA-C02 · Question #748

A SysOps administrator needs to create an Amazon S3 bucket as a resource in an AWS CloudFormation template. The bucket name must be randomly generated. The bucket must be encrypted by an AWS Key…

The correct answer is B. Bucket: Type: AWS::S3::Bucket Properties: BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: 'aws:kms' KMSMasterKeyID: KMS-KEY-ARN BucketKeyEnabled: true. Option B is correct because it omits the BucketName property entirely, which causes CloudFormation to auto-generate a unique, random bucket name - satisfying the 'randomly generated' requirement. It also uses the correct nested CloudFormation syntax for KMS encryption…

Submitted by skyler.x· Mar 30, 2026Security and Compliance / Storage and Data Management - Implementing and managing CloudFormation templates with encryption configurations and dynamic resource naming.

Question

A SysOps administrator needs to create an Amazon S3 bucket as a resource in an AWS CloudFormation template. The bucket name must be randomly generated. The bucket must be encrypted by an AWS Key Management Service (AWS KMS) key. Other resources in the template will reference the bucket. Which CloudFormation resource definition should the SysOps administrator use to meet these requirements? A. B. C. D.

Exhibits

SOA-C02 question #748 exhibit 1
SOA-C02 question #748 exhibit 2
SOA-C02 question #748 exhibit 3

Options

  • ABucket: Type: AWS::S3::Bucket Properties: - ServerSideEncryptionConfiguration: 'aws:kms'
  • BBucket: Type: AWS::S3::Bucket Properties: BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: 'aws:kms' KMSMasterKeyID: KMS-KEY-ARN BucketKeyEnabled: true
  • CBucket: Type: AWS::S3::Bucket Properties: BucketName: 'DOC-EXAMPLE-BUCKET' BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: 'aws:kms' KMSMasterKeyID: KMS-KEY-ARN BucketKeyEnabled: true
  • DBucket: Type: AWS::S3::Bucket Properties: BucketName: !Select [ '0', [ 'Default']] BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: 'aws:kms' KMSMasterKeyID: KMS-KEY-ARN BucketKeyEnabled: true

How the community answered

(23 responses)
  • B
    78% (18)
  • C
    9% (2)
  • D
    13% (3)

Explanation

Option B is correct because it omits the BucketName property entirely, which causes CloudFormation to auto-generate a unique, random bucket name - satisfying the 'randomly generated' requirement. It also uses the correct nested CloudFormation syntax for KMS encryption (BucketEncryption → ServerSideEncryptionConfiguration → ServerSideEncryptionByDefault with SSEAlgorithm: 'aws:kms'), and since it uses a logical resource name ('Bucket'), other resources in the template can reference it using !Ref or !GetAtt.

Topics

#CloudFormation#S3 Encryption#KMS#Infrastructure as Code

Community Discussion

No community discussion yet for this question.

Full SOA-C02 Practice