CodeDeploy Status Monitoring for Autoscaling Groups | AWS DevOps Engineer Exam Preparation

CodeDeploy Status Monitoring for Autoscaling Groups

Prev Question Next Question

Question

The Development Lead wants to know the status of CodeDeploy in time such as DeploymentStart, DeploymentSuccess or DeploymentFailure for the deployment of an autoscaling group.

One DevOps engineer is in charge of this task.

He needs to make sure that most of the major CodeDeploy activities are monitored and the Development Lead is notified in a suitable manner.

What below method should the DevOps engineer use to meet the Development Lead's need in a straightforward way?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Option D is Correct:

The requirement is that the Development Lead should be notified in time so the most.

straightforward way is SNS.

Option C is eliminated as it can not notify the Development.

Lead.

Option A is also incorrect because although AWS Config can record the configuration.

changes, it does not report the CodeDeploy activity status.

The best way is to configure SNS.

directly in the AWS CodeDeploy by a trigger.

This could be done via console or CLI.

The details can be found in.

https://docs.aws.amazon.com/codedeploy/latest/userguide/monitoring-sns-event-notifications.html.

Option B is incorrect: because CodeDeploy is not a service that Cloudwatch Metrics supports.

Please refer to.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html

for the list of services that Cloudwatch Metrics supports.

Please notice that Cloudwatch Logs of CodeDeploy can be used to set up SNS to provide notifications.

However it is still not the easiest way if compared with Option.

D.

The task of the DevOps engineer is to make sure that the Development Lead is notified of the status of CodeDeploy activities in a timely and suitable manner. The main challenge is to identify the right method that can be used to achieve this goal. The four options provided in the answer choices are:

A. AWS Config should be used as it is able to show the status of every CodeDeploy activity. One SNS topic can be used to subscribe to the CodeDeploy activities in AWS Config to get the development lead notified.

B. CodeDeploy is able to pass all its status to Cloudwatch metrics including CodeDeploy start, stop or pause. Create an alarm in the CodeDeploy metrics such as when a CodeDeploy failure happens. And then subscribe this alarm to an existing SNS topic. The SNS topic is responsible for notifying the development lead by email or SMS.

C. Create a new Cloudtrail and use it to record all the CodeDeploy API calls. When a CodeDeploy activity happens, the development lead will be able to see the details for the CodeDeploy status. He can then filter the CodeDeploy specific events in the Cloudtrail console/CLI and understand the running status.

D. The DevOps engineer should create a trigger in AWS CodeDeploy that publishes an Amazon Simple Notification Service (Amazon SNS) topic for the relevant AWS CodeDeploy deployment event. Then, when that event occurs, all subscribers to the associated topic will receive notifications through the endpoint specified in the topic, such as an SMS message or email message to the development lead.

Option A proposes using AWS Config to show the status of every CodeDeploy activity and using one SNS topic to notify the Development Lead. AWS Config is a service that provides a detailed inventory of the resources in an AWS account and tracks changes to these resources. It can be used to track changes to CodeDeploy resources such as deployments, instances, and applications. However, AWS Config does not provide real-time notifications, so it may not be suitable for notifying the Development Lead in a timely manner. Additionally, AWS Config may generate a large number of notifications, which may be overwhelming for the Development Lead. Therefore, option A may not be the best solution.

Option B suggests using CloudWatch metrics to monitor the status of CodeDeploy activities and using an alarm to trigger notifications to the Development Lead. CloudWatch is a monitoring service that can collect and track metrics, collect and monitor log files, and set alarms. CodeDeploy can pass its status to CloudWatch metrics, including start, stop, or pause. The DevOps engineer can create an alarm in the CodeDeploy metrics for events such as a CodeDeploy failure, and subscribe this alarm to an SNS topic. The SNS topic can then notify the Development Lead by email or SMS. This solution is simple and effective, as it provides real-time notifications when a CodeDeploy event occurs, and the Development Lead can receive notifications in a suitable manner. Therefore, option B is a good solution.

Option C suggests creating a new CloudTrail to record all CodeDeploy API calls and using it to track CodeDeploy events. CloudTrail is a service that provides a record of all API calls made in an AWS account, including calls made to CodeDeploy. However, CloudTrail does not provide real-time notifications, and it may be challenging to filter CodeDeploy-specific events from other API calls. Therefore, option C may not be the best solution.

Option D proposes creating a trigger in CodeDeploy that publishes an SNS topic for the relevant deployment event. When the event occurs, all subscribers to the associated topic will receive notifications through the endpoint specified in the topic, such as an SMS message or email message to the Development Lead. This solution is simple and effective, as it provides real-time notifications when a CodeDeploy event occurs, and the Development Lead can receive