
Answer-first summary for fast verification
Answer: Modify the CloudFormation templates. Replace the EC2 instances with R5 EC2 instances. Deploy the Amazon CloudWatch agent on the EC2 instances to generate custom application latency metrics for future capacity planning.
## Explanation **Correct Answer: D** **Why D is correct:** 1. **Memory-intensive workload identification**: The application is described as "stateful and needs to complete in-memory tasks," which indicates it's memory-intensive. M5 instances are general-purpose instances, while R5 instances are memory-optimized instances specifically designed for memory-intensive workloads. 2. **Proper monitoring for capacity planning**: Deploying the Amazon CloudWatch agent to generate custom application latency metrics provides actual application-level performance data, not just infrastructure metrics. This enables proactive capacity planning based on real application behavior. 3. **Operational efficiency**: Using CloudFormation templates ensures infrastructure as code practices, making changes repeatable and consistent. The solution addresses both the immediate performance issue (switching to memory-optimized instances) and provides a mechanism for future capacity planning. **Why other options are incorrect:** **A**: T3 instances are burstable performance instances, which are less suitable for memory-intensive workloads than R5 instances. Making changes via the AWS Management Console instead of CloudFormation reduces operational efficiency and repeatability. **B**: While Auto Scaling helps with scaling, it doesn't address the core issue of using inappropriate instance types for memory-intensive workloads. Manual capacity adjustments are not operationally efficient. **C**: While switching to R5 instances addresses the memory issue, relying only on built-in EC2 memory metrics doesn't provide application-level latency metrics needed for proper capacity planning of this specific application. **Key AWS Concepts:** - **EC2 Instance Families**: M5 (general purpose), R5 (memory optimized), T3 (burstable performance) - **CloudWatch Agent**: Enables collection of custom metrics from EC2 instances - **Infrastructure as Code**: CloudFormation provides operational efficiency through repeatable deployments - **Capacity Planning**: Requires application-specific metrics, not just infrastructure metrics
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company's application is having performance issues. The application is stateful and needs to complete in-memory tasks on Amazon EC2 instances. The company used AWS CloudFormation to deploy infrastructure and used the M5 EC2 instance family. As traffic increased, the application performance degraded. Users are reporting delays when the users attempt to access the application.
Which solution will resolve these issues in the MOST operationally efficient way?
A
Replace the EC2 instances with T3 EC2 instances that run in an Auto Scaling group. Make the changes by using the AWS Management Console.
B
Modify the CloudFormation templates to run the EC2 instances in an Auto Scaling group. Increase the desired capacity and the maximum capacity of the Auto Scaling group manually when an increase is necessary.
C
Modify the CloudFormation templates. Replace the EC2 instances with R5 EC2 instances. Use Amazon CloudWatch built-in EC2 memory metrics to track the application performance for future capacity planning.
D
Modify the CloudFormation templates. Replace the EC2 instances with R5 EC2 instances. Deploy the Amazon CloudWatch agent on the EC2 instances to generate custom application latency metrics for future capacity planning.