Cost-Optimized Architecture I
Prepare yourself for the AWS Certified Solutions Architect Associate SAA-C03 Certificate exam with practice questions related to Amazon CloudWatch, Amazon S3 storage classes and life cycle transition, Amazon EC2 purchase options, Amazon DynamoDB Accelerator, and Amazon CloudFront to design cost-effective architectures.
We'll cover the following
Question 37
You are providing consulting services for a state organization focused on managing the state lottery. You have been tasked with generating 2 million barcodes as quickly as possible. This will require EC2 instances with an average CPU utilization of 70% for each one. To accomplish this, you plan to launch 10 EC2 instances to create the barcodes. You estimate that the instances will complete the job between 11 p.m. and 1 a.m. However, you want to avoid leaving the instances idle for up to 9 hours until the next morning.
How can you automatically terminate the instances once the task is completed with the least overhead and in a cost-effective manner?
A. Write a Python program that queries the instance status. Additionally, create a Lambda function that can be triggered when a specific status is reached to terminate the instance.
B. Develop a cron job that checks the instance status. If a certain status is met, have the cron job initiate CloudFormation to terminate the current instance and create a new one from a template.
C. Set up a CloudWatch alarm that triggers when the average CPU utilization remains below 5% for 15 minutes, automatically terminating the instance.
D. Create a cron job that queries the instance status. Also, develop a Lambda function that can be triggered upon a specific status to terminate the instance.
Get hands-on with 1400+ tech skills courses.