AWS Certified DevOps Engineer – Professional — Question 155

A company deploys updates to its Amazon API Gateway API several times a week by using an AWS CodePipeline pipeline. As part of the update process, the company exports the JavaScript SDK for the API from the API Gateway console and uploads the SDK to an Amazon S3 bucket.

The company has configured an Amazon CloudFront distribution that uses the S3 bucket as an origin. Web clients then download the SDK by using the CloudFront distribution's endpoint. A DevOps engineer needs to implement a solution to make the new SDK available automatically during new API deployments.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct because it directly integrates the process of downloading the SDK, uploading it to S3, and invalidating the CloudFront cache into the CodePipeline, ensuring that updates are automatically handled post-deployment. The other options involve either unnecessary complexity or do not correctly invalidate the cache at the right time, potentially leading to clients receiving stale SDK versions.