Question

Difficulty: HardAWS Compute Optimizer and Right-Sizing

A SysOps Administrator manages a multi-account environment under AWS Organizations and has enabled AWS Compute Optimizer for the entire organization from the management account. The administrator notices that Compute Optimizer is generating recommendations for EC2 instances based only on CPU and network utilization, but is missing memory-based recommendations for a critical microservices application running on Linux EC2 instances. Which of the following actions must the administrator take to ensure Compute Optimizer can provide recommendations that include memory utilization? (Select two.)

  1. Install and configure the Unified CloudWatch Agent on the EC2 instances to publish memory utilization metrics to Amazon CloudWatch under the standard CWAgent namespace.Answer
  2. Attach an IAM role containing the CloudWatchAgentServerPolicy policy to the EC2 instances to authorize the agent to write metrics to CloudWatch.Answer
  3. C
    Enable Amazon EC2 detailed monitoring on the EC2 instances from the Amazon EC2 console or via the AWS CLI.
  4. D
    Create a Gateway VPC endpoint for Amazon CloudWatch in the VPC of each member account and associate it with the subnet route tables.
  5. E
    Configure an AWS Budgets alert with a target action to run a Systems Manager Run Command that exports memory utilization to AWS Compute Optimizer.

Answer

To enable memory-based recommendations in AWS Compute Optimizer, the Unified CloudWatch Agent must be installed and configured on the EC2 instances to publish memory metrics to the standard CWAgent namespace, and the instances must be associated with an IAM role that grants the CloudWatchAgentServerPolicy permissions to write metrics to CloudWatch.
AWS Compute Optimizer requires guest operating system-level memory metrics to generate recommendations for memory-bound workloads. Because memory is not collected by the hypervisor, the administrator must install the Unified CloudWatch Agent on the EC2 instances and configure it to publish metrics under the default CWAgent namespace. Additionally, the instances must be authorized to upload these metrics to CloudWatch, which is accomplished by attaching an IAM role with the CloudWatchAgentServerPolicy policy to the instances.

Step-by-Step Solution

1
Deploy and configure the Unified CloudWatch Agent on the target Linux EC2 instances.
The agent collects operating system-level memory metrics (such as memory utilization) and sends them to CloudWatch under the standard CWAgent namespace.
AWS Compute Optimizer does not receive memory metrics by default from the EC2 hypervisor; it depends on the CloudWatch Agent to publish these metrics.
2
Attach an IAM instance profile containing the CloudWatchAgentServerPolicy permissions to the EC2 instances.
The EC2 instances are authorized to write the gathered memory metrics to Amazon CloudWatch.
Without proper IAM permissions, the agent running on the EC2 instances will fail to write metric data to CloudWatch, leaving Compute Optimizer without the necessary data.

Key Concept

AWS Compute Optimizer Memory Metrics Dependency
Estimated Time:2m 0s
Rate this question