SAP-C02 practice question 10 of 35

A company has migrated an application from on premises to AWS. The application frontend is a static website that runs on two Amazon EC2 instances…

Full set: 689 questions

Domain Accelerate Workload Migration and Modernization

A company has migrated an application from on premises to AWS. The application frontend is a static website that runs on two Amazon EC2 instances behind an Application Load Balancer (ALB). The application backend is a Python application that runs on three EC2 instances behind another ALB. The EC2 instances are large, general purpose On-Demand Instances that were sized to meet the on- premises specifications for peak usage of the application. The application averages hundreds of thousands of requests each month. However, the application is used mainly during lunchtime and receives minimal traffic during the rest of the day. A solutions architect needs to optimize the infrastructure cost of the application without negatively affecting the application availability. Which combination of steps will meet these requirements? (Choose two.)
Answer options
A: Change all the EC2 instances to compute optimized instances that have the same number of cores as the existing EC2 instances.
B: Move the application frontend to a static website that is hosted on Amazon S3. Correct answer
C: Deploy the application frontend by using AWS Elastic Beanstalk. Use the same instance type for the nodes.
D: Change all the backend EC2 instances to Spot Instances. Correct answer
E: Deploy the backend Python application to general purpose burstable EC2 instances that have the same number of cores as the existing EC2 instances.
Correct Answer:
B. Move the application frontend to a static website that is hosted on Amazon S3.; D. Change all the backend EC2 instances to Spot Instances.
Explanation

This solution addresses cost optimization for both the frontend and backend tiers. The frontend is a static website, which is ideally suited for hosting on Amazon S3. This serverless approach is highly available, scalable, and significantly more cost-effective than running dedicated EC2 instances and a load balancer. For the backend, the application is fault-tolerant (running on three instances behind an ALB) and has a spiky usage pattern. Switching from On-Demand to Spot Instances for the backend EC2 instances can provide savings of up to 90%. Because the application is already designed to be resilient to the failure of a single instance, it is a perfect candidate for Spot Instances, which can be interrupted. This combination maximizes cost savings without impacting availability.

Why Incorrect

A. Changing instance families does not address the core problem of over-provisioning for a workload that is only busy for a short period.
C. AWS Elastic Beanstalk still runs on EC2 instances, and using the same instance type would not result in any cost savings.
E. Burstable (T-family) instances are not ideal for sustained peak loads like a lunchtime rush, as they can exhaust their CPU credits and be throttled, negatively affecting performance.

References

1. Hosting a static website using Amazon S3: AWS Documentation clearly states

"You can host a static website on Amazon S3. On a static website

individual webpages include static content... In contrast

a dynamic website relies on server-side processing... A simple and low-cost way to host a static website is to use Amazon S3."

Source: AWS S3 Developer Guide

"Hosting a static website using Amazon S3".

2. Amazon EC2 Spot Instances Best Practices: AWS documentation recommends using Spot Instances for fault-tolerant and flexible applications. "Because Spot Instances are tightly integrated with AWS services such as Auto Scaling... you can leverage Spot Instances for a variety of fault-tolerant and flexible applications. Examples include... web services..."

Source: AWS EC2 User Guide for Linux Instances

"Spot Instance requests"

Section: "Spot best practices".

3. Cost Optimization Pillar

AWS Well-Architected Framework: This whitepaper advises using the most cost-effective resources. "Use serverless architectures to remove the need for you to run and maintain servers to carry out traditional compute activities. For example

storing static assets in Amazon S3 instead of on servers."

Source: AWS Well-Architected Framework

Cost Optimization Pillar whitepaper (aws-well-architected-framework.pdf)

Page 18

Section: "Cost-effective resources".

4. Burstable performance instances: The documentation explains the CPU credit mechanism and the risk of throttling. "If your instance requires high CPU for a prolonged period

you can... pay a flat additional fee per vCPU-hour... Or

we recommend using a fixed performance instance size..." This indicates burstable instances are not suited for sustained peaks.

Source: AWS EC2 User Guide for Linux Instances

"Burstable performance instances".

Scroll to Top