Courseiva
DeploymentmediumMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A company uses AWS CodePipeline to deploy a static website to Amazon S3. The pipeline includes a deploy action that uses AWS CloudFormation to create the S3 bucket and upload files. The developer notices that the deploy action fails intermittently with a 'BucketAlreadyExists' error. What is the most likely cause?

⚠ Common exam trap

Many candidates confuse 'BucketAlreadyExists' with permission or policy errors, but AWS specifically tests the global uniqueness constraint of S3 bucket names as a distinct failure mode in deployment pipelines.

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 by another AWS account.

The 'BucketAlreadyExists' error occurs when an S3 bucket name is globally unique across all AWS accounts. If the bucket name specified in the CloudFormation template has already been claimed by another AWS account, the deployment will fail intermittently if the bucket is deleted and recreated or if the pipeline runs in a different region where the name is taken. This is a common issue when using hardcoded or non-unique bucket names.

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 has versioning enabled.

    Why it's wrong here

    Versioning is a feature configured on an S3 bucket *after* its successful creation, or it describes the state of an *already existing* bucket. If a CloudFormation stack fails to create a bucket due to a name conflict, the presence or absence of versioning on that non-existent bucket is entirely irrelevant to the `BucketAlreadyExists` error. This error specifically indicates that the desired name cannot be used for a *new* bucket.

  • The CloudFormation template has incorrect IAM permissions.

    Why it's wrong here

    Incorrect IAM permissions for the CloudFormation service role would typically manifest as an `AccessDenied` error when the service attempts to provision resources. This error indicates that the principal lacks the necessary `s3:CreateBucket` permission. A `BucketAlreadyExists` error, however, specifically points to a naming collision, implying that the permission to create buckets generally exists, but the chosen name is unavailable.

  • The S3 bucket name is already taken by another AWS account.

    Why this is correct

    S3 bucket names are globally unique across all AWS accounts and regions, acting as a universal namespace. Therefore, if any other AWS account, anywhere in the world, has already registered a bucket with the exact name specified in the CloudFormation template, the creation attempt will fail. The `BucketAlreadyExists` error precisely indicates this global naming conflict, preventing the new bucket from being provisioned.

  • The S3 bucket policy is too restrictive.

    Why it's wrong here

    An S3 bucket policy is an access control document that defines permissions for an *existing* bucket and its objects, governing who can access what and how. This policy is applied *after* the bucket has been successfully created. Consequently, a restrictive bucket policy cannot be the cause of a `BucketAlreadyExists` error, which occurs during the initial provisioning phase due to a naming conflict, not an access issue on a non-existent resource.

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

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.