What would be a reliable and efficient way to handle th…

When an Auto Scaling group is running in Amazon Elastic Compute Cloud (EC2), your application rapidly scales up and
down in response to load within a 10-minute window; however, after the load peaks, you begin to see problems in your
configuration management system where previously terminated Amazon EC2 resources are still showing as active. What
would be a reliable and efficient way to handle the cleanup of Amazon EC2 resources within your configuration
management system? (Choose two.)

When an Auto Scaling group is running in Amazon Elastic Compute Cloud (EC2), your application rapidly scales up and
down in response to load within a 10-minute window; however, after the load peaks, you begin to see problems in your
configuration management system where previously terminated Amazon EC2 resources are still showing as active. What
would be a reliable and efficient way to handle the cleanup of Amazon EC2 resources within your configuration
management system? (Choose two.)

A.
Write a script that is run by a daily cron job on an Amazon EC2 instance and that executes API Describe calls of the EC2 Auto Scaling
group and removes terminated instances from the configuration management system.

B.
Configure an Amazon Simple Queue Service (SQS) queue for Auto Scaling actions that has a script that listens for new messages
and removes terminated instances from the configuration management system.

C.
Use your existing configuration management system to control the launching and bootstrapping of instances to reduce the number of
moving parts in the automation.

D.
Write a small script that is run during Amazon EC2 instance shutdown to de-register the resource from the configuration management
system.

E.
Use Amazon Simple Workflow Service (SWF) to maintain an Amazon DynamoDB database that contains a whitelist of instances that
have been previously launched, and allow the Amazon SWF worker to remove information from the configuration management system.



Leave a Reply 7

Your email address will not be published. Required fields are marked *


asm

asm

For me A doesn’t make sense because you don’t want the cron job to run only daily it needs to be run more frequently because the auto scaling group is scaling every 10 mins you would want to de-register terminated instances as soon as they have been terminated.

ken

ken

The same thinking as you.
But for all answer, A and D are more suitable.

ADV-IT

ADV-IT

rapidly scales up and down in response to load within a 10-minute window.

Daily cron job will not make sence.
B,D I think, and not A,D

BTuan

BTuan

Cannot be B.
“Configure an Amazon Simple Queue Service (SQS) queue for Auto Scaling actions that has a script that listens” => whqt will execute this script? Sqs and asg cannot.
So A and D seem the best in those options

mosksky

mosksky

D is for sure, however other one i am thinking is C

sporokh

sporokh

Answer is A and D:
The logic is to deregister the resource (take couple of seconds) that can be applied during termination. This will “mark” those resources as “offline” for example in the configuration management system, but they would still be present there. —-> D
And after that you may remove terminated instances from the configuration management system and do it any time, since they are already de-registered, that’s why you may run a daily cron job. —> A

JoeS

JoeS

A,D makes sense