
Ultimate access to all questions.
A company frequently updates its Amazon API Gateway API using AWS CodePipeline. As part of the deployment process, they manually export the JavaScript SDK for the API, upload it to an Amazon S3 bucket, and use this bucket as the origin for an Amazon CloudFront distribution. Web clients access the SDK through the CloudFront endpoint. To streamline this process, a DevOps engineer must implement an automated solution that ensures the latest SDK is available immediately after each API deployment. Which solution meets these requirements?
A
Create a CodePipeline action immediately after the API deployment stage. Configure this action to trigger an AWS Lambda function that downloads the SDK from API Gateway, uploads it to the S3 bucket, and initiates a CloudFront invalidation for the SDK path.
B
Create a CodePipeline action immediately after the API deployment stage. Configure this action to use the CodePipeline integration with API Gateway to export the SDK to Amazon S3, followed by another action that uses the CodePipeline integration with Amazon S3 to invalidate the cache for the SDK path.
C
Create an Amazon EventBridge rule that responds to UpdateStage events from aws.apigateway. Configure this rule to trigger an AWS Lambda function that downloads the SDK from API Gateway, uploads it to the S3 bucket, and calls the CloudFront API to create an invalidation for the SDK path.
D
Create an Amazon EventBridge rule that responds to CreateDeployment events from aws.apigateway. Configure this rule to trigger an AWS Lambda function that downloads the SDK from API Gateway, uploads it to the S3 bucket, and calls the S3 API to invalidate the cache for the SDK path.