exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 441 discussion

A developer hosts a static website on Amazon S3 and connects the website to an Amazon CloudFront distribution. The website uses a custom domain name that points to the CloudFront URL.

The developer has set up a continuous integration and continuous delivery (CI/CD) pipeline. The pipeline automatically runs when changes occur in an AWS CodeCommit repository. The pipeline has a source stage and then a build stage. The build stage invokes an AWS CodeBuild project that references a buildspec.yml file. The buildspec.yml file builds the code and deploys the static files to the S3 bucket.

The pipeline runs successfully, and the latest website files are visible in the S3 bucket and at the S3 website URL. However, when the developer accesses the website through the CloudFront domain, the updates are not reflected on the website.

What should the developer configure the buildspec.yml file to do to resolve this issue?

  • A. Properly synchronize the objects in the S3 bucket with new files from the source stage.
  • B. Delete the previous website files in the S3 bucket and redeploy the website files.
  • C. Invalidate the file caches for the primary CloudFront distribution.
  • D. Modify the cross-origin resource sharing (CORS) policy of the S3 bucket and redeploy the website files.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
examuserss
3 months, 3 weeks ago
Selected Answer: C
Selected Answer: C Invalidate the CloudFront cache: To ensure that CloudFront serves the most up-to-date content, you can trigger a cache invalidation in your buildspec.yml file. This will force CloudFront to fetch the latest files from the S3 bucket rather than serving cached content. You can do this by using the AWS CLI to invalidate the CloudFront distribution cache.
upvoted 1 times
...
4d716d6
4 months, 4 weeks ago
Selected Answer: C
Invalidate the caches to enable the new code deployed to reflect
upvoted 1 times
...
albert_kuo
6 months, 2 weeks ago
Selected Answer: C
aws cloudfront create-invalidation --distribution-id EXAMPLE123 --paths "/*"
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago