DVA-C02 Deployment Practice Question
A company uses AWS CodePipeline to deploy a static website to Amazon S3. The pipeline has a build stage that compiles the website and a deploy stage that syncs the build output to an S3 bucket. After a recent change, the pipeline succeeds but the website does not show the updated content. 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
✓
Amazon CloudFront is caching the old content and needs an invalidation.
Amazon CloudFront is caching the old content and needs an invalidation. Since the pipeline succeeds and the deploy stage syncs the build output to S3, the updated files are likely in the bucket, but CloudFront continues serving cached objects from edge locations until the cache expires or an invalidation is created (e.g., aws cloudfront create-invalidation --distribution-id <ID> --paths "/*"). Option B is unlikely because a silent build failure would typically cause the build stage to fail or produce missing artifacts, and the pipeline reports success. Option C is not a standard CodePipeline deploy behavior for S3 sync actions, which deploy the specified artifacts rather than conditionally skipping unchanged content. Option D would cause access denied errors for website visitors, not stale content, and the pipeline could still succeed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Amazon CloudFront is caching the old content and needs an invalidation.
Why this is correct
When a static website is deployed via CodePipeline to an S3 bucket and served through Amazon CloudFront, CloudFront caches the content at its edge locations to improve performance and reduce origin load. If new content is deployed to the S3 origin, CloudFront will continue serving the previously cached version to users until its Time-To-Live (TTL) expires or an explicit invalidation request is made. Therefore, even with a successful S3 deployment, users will see old content until the cache is cleared by an invalidation.
- ✗
The build output is empty because the build failed silently.
Why it's wrong here
AWS CodePipeline is designed with robust error handling, and a silent build failure resulting in empty output would cause the CodeBuild stage to transition to a FAILED state. This failure would prevent the pipeline from proceeding to the subsequent deploy stage, thus contradicting the premise that the deployment was successful. If the pipeline reports success, it implies the build output was generated and passed to the next stage as expected.
- ✗
The deploy action is configured to skip if the source content has not changed.
Why it's wrong here
If the source content had not changed, the CodePipeline would likely not have been triggered in the first place, or the source stage would not have detected new artifacts to process. However, the question implies a new deployment was attempted and completed successfully, yet old content persists. If the source *did* change, the deploy action would execute; skipping it due to no change would only occur if the pipeline wasn't triggered or the source stage found no new artifacts, which isn't the scenario described by a successful deployment.
- ✗
The S3 bucket policy does not allow public read access.
Why it's wrong here
An S3 bucket policy that restricts public read access would prevent users from accessing any content in the bucket, resulting in an "Access Denied" error when attempting to view the website. This scenario would manifest as the website being completely inaccessible, not as successfully loading an outdated version of the content. The problem states the website is accessible but shows old content, making this option incorrect as the symptom does not match.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
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 →
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.