A startup is experiencing unexpected cost increases because development teams occasionally leave Amazon EC2 instances running over weekends in a sandbox account. The SysOps administrator must implement a cost control mechanism to enforce a monthly cost limit of $300. If the actual cost reaches this limit, all running EC2 instances in the account must be stopped automatically, and the operations team must receive a notification in their Slack channel.
Which combination of steps should the SysOps administrator perform to meet these requirements? (Select TWO.)
- Create a monthly cost budget in AWS Budgets with an actual cost threshold of $300. Define a budget action to stop the EC2 instances, and associate an IAM role that trusts budgets.amazonaws.com and grants permissions for ec2:DescribeInstances and ec2:StopInstances.Cevap
- Configure the budget alert to send a notification to an Amazon SNS topic. Configure AWS Chatbot to receive messages from the SNS topic and deliver them to the Slack channel.Cevap
- CCreate a billing alarm in Amazon CloudWatch that monitors the EstimatedCharges metric. Configure the alarm action to stop the EC2 instances when the metric exceeds $300, and configure an email subscription for the Slack channel.
- DCreate an AWS Cost Anomaly Detection monitor for the sandbox account with a threshold of $300. Configure an anomaly subscription to trigger an AWS Lambda function that stops all running EC2 instances and posts a message to Slack.
- EConfigure a budget in AWS Budgets with an action to attach a Service Control Policy (SCP) that denies ec2:RunInstances. Attach the SCP to the sandbox account when the cost reaches $300, and use Amazon EventBridge to send a notification to Slack.
Cevap
To meet the requirements, the SysOps administrator should create a monthly cost budget in AWS Budgets with a threshold of $300 and configure a budget action to stop EC2 instances using an IAM role with the correct trust relationship and permissions. Additionally, the budget alert should be configured to publish to an Amazon SNS topic, which triggers an AWS Chatbot configuration connected to the Slack channel.
The correct steps involve setting up an AWS Budgets monthly cost budget with a threshold of $300. To automatically stop instances, a budget action must be defined using an IAM role that permits the budgets service principal to execute stop commands. To send notifications to Slack, the budget alert is published to an Amazon SNS topic, and AWS Chatbot is configured to subscribe to that topic and route the alerts to the Slack channel.
Adım Adım Çözüm
Anahtar Kavram
AWS Budgets supports automated cost-control actions, such as stopping EC2 instances, by assuming a configured service-linked IAM role. Alerts can be integrated with AWS Chatbot via Amazon SNS to notify external chat channels like Slack.