Soru

Zorluk: ZorDeployment Strategies and Execution

A SysOps Administrator is configuring a blue/green deployment strategy using AWS CodeDeploy for an application running on Amazon EC2 instances. The deployment must meet the following requirements:
- The deployment must automatically roll back if any of the replacement instances exceed a specific memory utilization threshold during the deployment.
- The original EC2 instances must remain active for 2 hours after traffic has successfully shifted to the replacement instances to allow for final validation.

Which combination of configurations will meet these requirements? (Select TWO.)

  1. Create an Amazon CloudWatch alarm based on memory metrics collected by the CloudWatch agent on the replacement instances, and add this alarm to the deployment group's auto-rollback configuration.Cevap
  2. Configure the deployment group to terminate the original instances after a successful deployment, setting the wait time before termination to 2 hours.Cevap
  3. C
    Configure the deployment group to keep the original instances running indefinitely, and configure a scheduled AWS Systems Manager runbook to terminate the replacement instances after 2 hours.
  4. D
    Enable detailed monitoring on the EC2 instances to collect standard memory utilization metrics at 1-minute intervals, and associate this metric with the rollback alarm.
  5. E
    Add the `iam:PassRole` permission to the EC2 instances' IAM role to allow the Amazon CloudWatch agent to delegate permissions to AWS CodeDeploy.

Cevap

Create an Amazon CloudWatch alarm based on memory metrics collected by the CloudWatch agent on the replacement instances, and add this alarm to the deployment group's auto-rollback configuration. In addition, configure the deployment group to terminate the original instances after a successful deployment, setting the wait time before termination to 2 hours.
To monitor memory utilization, which is an operating system-level metric not captured by default EC2 metrics, the CloudWatch agent must be installed to send custom metrics. A CloudWatch alarm is then created and integrated with the CodeDeploy deployment group to trigger an automatic rollback when memory usage exceeds the defined threshold. Additionally, to keep the original instances for validation and ensure they are terminated automatically after 2 hours, the deployment group's success action must be configured to terminate the original instances with a 2-hour delay.

Adım Adım Çözüm

1
Identify the requirement for tracking memory utilization and triggering a rollback.
Realize that memory utilization is an operating system-level metric and not part of the standard CloudWatch hypervisor metrics. Therefore, the CloudWatch agent must be installed on the replacement instances to send custom memory metrics.
Default and detailed EC2 monitoring do not include memory usage. The resulting custom metric must be used to create a CloudWatch alarm that CodeDeploy can monitor for automatic rollbacks.
2
Identify the requirement to retain the original instances for 2 hours before cleanup.
Set the deployment group's action on deployment success to terminate the original instances after a specified time, and configure the duration to 2 hours (120 minutes).
This automatically retains the old fleet during the verification window, allowing for manual checks or automatic rollbacks, and then terminates them to stop charges.

Anahtar Kavram

Integrating custom operating system metrics with CodeDeploy rollback triggers and managing instance lifecycle termination delays in blue/green deployments.
Tahmini Süre:2m 30s
Bu soruyu puanla