Soru

Zorluk: Çok zorDeployment Strategy Design

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.)

  1. 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.Cevap
  2. 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.Cevap
  3. C
    Create 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.
  4. D
    Create 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.
  5. E
    Create 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.

Cevap

The correct configurations are: creating a staging CloudFront distribution with the new S3 bucket origin and cache behaviors, setting up a continuous deployment policy with a session-based routing configuration of 10% weight and session stickiness associated with the production distribution; and promoting the staging distribution to production to shift 100% of traffic to the new configuration with zero downtime.
The correct configurations involve using CloudFront continuous deployment policies. First, you create a staging distribution using the production distribution as a template, configured with the new origins and behaviors. You then set up a continuous deployment policy with session-based routing at 10% weight and associate it with the production distribution. CloudFront automatically routes 10% of traffic to the staging distribution while maintaining session stickiness. Once verified, promoting the staging distribution seamlessly copies its configurations to the production distribution, shifting 100% of traffic with zero downtime.

Adım Adım Çözüm

1
Assess the routing and session stickiness requirements for the deployment.
Determine that using a CloudFront continuous deployment policy with session-based routing at 10% weight satisfies both the traffic percentage and session stickiness requirements natively.
This avoids DNS CNAME conflicts and eliminates the need for custom header injection logic.
2
Configure the staging environment and traffic policy.
Create a staging CloudFront distribution using the production distribution as a template, set up the new origin/cache configurations, and associate a session-based continuous deployment policy with the production distribution.
This isolates the test traffic to the new version using the native aws-cf-cd-co cookie for stickiness.
3
Promote the staging configuration to complete the deployment.
Promote the staging distribution to production via the AWS Console or CLI.
This copies the staging configurations onto the production distribution, seamlessly shifting 100% of production traffic with zero downtime.

Anahtar Kavram

Deployment Strategy Design using CloudFront Continuous Deployment Staging Distributions
Bu soruyu puanla