ExamQuestions.com

Register
Login
AWS Certified DevOps Engineer Professional Exam Questions

Amazon

AWS Certified DevOps Engineer Professional

162 / 500

Question 162:

In your company, AWS ECS is being used to manage Docker containers for a Java application. Recently, to meet the market need, several important features are under development and the team is under pressure to deliver new releases. Your manager asks you to notify the team in both Slack channel and email whenever the ECS task enters into the Stopped status so that relevant personnel can take action immediately. What is the best way for you to implement that?

Answer options:

A.Create the following CloudWatch Event rule. Add a target of Lambda function to send a notification in Slack and another target of SNS to send the email.
{
"source": [
"aws.ecs"
],
"detail-type": [
"ECS Task State Change"
],
"detail": {
"lastStatus": [
"STOPPED"
]
}
}
B.Configure the ECS cluster instances to send log files in /var/log/ecs/ to CloudWatch Logs. Create a Metric Filter to search for the keyword “STOPPED”. Create an alarm to trigger a Lambda function whenever there is a match. The Lambda function sends customized notifications to the Slack channel and email list.
C.Create a CloudWatch Event rule as below. Use a Lambda function as the target to send notifications to both the Slack channel and the relevant email list.
{
"source": [
"aws.ecs"
],
"detail-type": [
"ECS Container Instance State Change"
],
"detail": {
"desireStatus": [
"STOPPED"
]
}
}
D.Configure the ECS cluster instances to send log files in /var/log/docker/ to CloudWatch Logs. Create a Metric Filter to search for the keyword “STOPPED”. Create an alarm to trigger an SNS notification whenever there is a match. Subscribe a Lambda function to the SNS topic which sends a message to the Slack channel and email list.