DOP-C02 · Question #105
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 fr
The correct answer is A. Create a CodePipeline action immediately after the deployment stage of the API. Configure the action. Explanation Option A is correct because adding a CodePipeline action immediately after the API deployment stage ensures the SDK export and S3 upload happen automatically as part of the same pipeline execution, maintaining synchronization between the API version and the SDK availa
Question
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?
Options
- ACreate a CodePipeline action immediately after the deployment stage of the API. Configure the action
- BCreate a CodePipeline action immediately after the deployment stage of the API. Configure the action
- CCreate an Amazon EventBridge rule that reacts to UpdateStage events from aws.apigateway.
- DCreate an Amazon EventBridge rule that reacts to CreateDeployment events from aws.apigateway.
How the community answered
(28 responses)- A82% (23)
- B4% (1)
- C11% (3)
- D4% (1)
Explanation
Explanation
Option A is correct because adding a CodePipeline action immediately after the API deployment stage ensures the SDK export and S3 upload happen automatically as part of the same pipeline execution, maintaining synchronization between the API version and the SDK available to clients. This approach also allows for a CloudFront cache invalidation to be triggered as part of the same action or a subsequent step, ensuring web clients receive the updated SDK without waiting for the cache to expire naturally.
Why the distractors are wrong:
- Option B likely differs from A in a critical implementation detail (such as the placement of the action or missing the CloudFront invalidation step), making it incomplete or incorrect as a solution.
- Option C is wrong because
UpdateStageevents may fire in contexts unrelated to a full SDK-impacting deployment, making it an unreliable trigger that could cause unnecessary or mistimed SDK exports. - Option D is wrong because
CreateDeploymentevents fire at the deployment level but do not guarantee the stage has been updated and ready for SDK export, making it a premature trigger point.
Memory Tip
Think "Pipeline owns the process" - when updates are already managed by CodePipeline, the cleanest solution is to extend the pipeline with additional actions rather than introducing separate event-driven triggers, keeping automation centralized and predictable.
Topics
Community Discussion
No community discussion yet for this question.