A company is designing a deployment pipeline for a single-page web application (SPA) hosted on Amazon S3 and served via Amazon CloudFront. The development team wants to implement a canary deployment strategy where of live user traffic is routed to a new version of the frontend hosted in a separate S3 bucket. The traffic must be monitored for minutes. If no errors are detected, the deployment must complete by serving the new version to all users. If errors are detected, the traffic must immediately revert to the original version.
Which two actions should the solutions architect take to configure this deployment strategy? (Select two.)
- Create a staging CloudFront distribution that points to the new S3 bucket origin.Cevap
- Create a continuous deployment policy on the primary CloudFront distribution to route of live traffic to the staging distribution, and promote the staging distribution to primary once validated.Cevap
- CConfigure an Amazon Route 53 weighted routing policy to split traffic between the primary distribution and a new standalone primary distribution pointing to the new S3 bucket.
- DConfigure a CloudFront origin group with the primary origin pointing to the existing S3 bucket and the secondary origin pointing to the new S3 bucket, setting failover criteria to trigger on or errors.
- ECreate an AWS Lambda@Edge function associated with the primary distribution's Viewer Request event to randomly rewrite the request URI to the new S3 bucket for of the incoming requests.
Cevap
Create a staging CloudFront distribution that points to the new S3 bucket origin, and create a continuous deployment policy on the primary CloudFront distribution to route of live traffic to the staging distribution, promoting the staging distribution to primary once validated.
To implement a canary deployment on CloudFront, the solutions architect should use CloudFront's native continuous deployment feature. This requires creating a staging distribution pointing to the new version's S3 bucket, and then configuring a continuous deployment policy on the primary distribution to route of traffic to the staging distribution. Once validated, promoting the staging distribution updates the primary distribution for all users.
Adım Adım Çözüm
Anahtar Kavram
CloudFront Continuous Deployment