A financial services company is preparing to deploy a major update to its client-facing web application. The application's frontend is hosted on Amazon S3 and served via an Amazon CloudFront distribution, while the backend APIs are hosted on Amazon ECS Fargate.
To minimize the risk of the release, the DevOps team must design a deployment strategy that routes exactly 10% of the live production traffic to a new staging environment (incorporating updated CloudFront cache policies, a new S3 bucket, and a new ECS service version). The traffic routing must support session stickiness to ensure a consistent user experience during testing. If any anomalies are detected, the team must be able to roll back the traffic immediately with zero downtime.
Which two configurations must be implemented to achieve this deployment strategy? (Select two.)
- Create a staging CloudFront distribution using the production distribution as a template, and configure it with the new S3 bucket origin and cache behaviors. Create a continuous deployment policy with a session-based routing configuration, set the weight to 10.0%, enable session stickiness, and associate the policy with the production distribution.Answer
- After verifying the deployment, promote the staging distribution to production using the CloudFront console or AWS CLI. This action copies the staging distribution's configuration directly into the production distribution, shifting 100% of traffic to the new configuration with zero downtime.Answer
- CCreate a second production CloudFront distribution with the same Alternate Domain Name (CNAME). Use Route 53 weighted alias records to route 10% of traffic to the second distribution, and configure Route 53 IP-based routing to maintain session stickiness.
- DCreate a staging CloudFront distribution. Configure a continuous deployment policy with a header-based routing configuration matching the header X-Route-Staging. Deploy a CloudFront Function on the viewer request event of the production distribution that randomly generates the header for 10% of requests and appends a custom cookie for session stickiness.
- ECreate a new Application Load Balancer (ALB) and register the new S3 bucket as an IP target. Configure a Route 53 weighted routing policy to route 10% of traffic to the ALB and 90% of traffic to the production CloudFront distribution, using ALB cookie-based stickiness to maintain session persistence.