Courseiva

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is using AWS CloudFormation to deploy a stack that includes an S3 bucket and a Lambda function. The stack fails with the error 'The following resource(s) failed to create: [MyBucket]'. What is the most likely cause?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The S3 bucket name is already taken.

The S3 bucket name is already taken. S3 bucket names must be globally unique across all AWS accounts and regions, so if the requested name already exists, CloudFormation fails to create the MyBucket resource with exactly this kind of 'failed to create' error. The other options do not fit: a VPC configuration issue would typically affect resources like Lambda or EC2 networking, not S3 bucket creation; a malformed bucket policy would usually fail during policy attachment or update rather than initial bucket creation; and invalid Lambda code would cause the Lambda resource to fail, not MyBucket.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    The S3 bucket name is already taken.

    Why this is correct

    S3 bucket names must be globally unique across all AWS accounts and regions; if the specified BucketName property is already claimed by another account, CloudFormation's CreateBucket call fails immediately with a naming conflict, which is the most common cause of this specific error.

  • ✗

    The stack's VPC configuration is incorrect.

    Why it's wrong here

    S3 buckets are global, region-scoped resources that exist independently of any VPC — they have no VPC association or subnet placement, so a VPC misconfiguration is structurally incapable of causing an S3 resource creation failure.

  • ✗

    The S3 bucket policy is malformed.

    Why it's wrong here

    A bucket policy is an optional, separate sub-resource that is typically attached after the bucket already exists; a malformed policy document would fail at the AWS::S3::BucketPolicy resource, producing a distinct error referencing that resource, not MyBucket itself.

  • ✗

    The Lambda function code is invalid.

    Why it's wrong here

    The error explicitly names MyBucket as the failed resource; the Lambda function is a completely separate resource in the template, and CloudFormation reports failures per logical resource ID, so invalid Lambda code would surface under the Lambda resource's own failure message instead.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.