You work in the Site Reliable Engineering team as a DevOps engineer.
Your team is maintaining several pipelines in the AWS CodePipeline service.
However, you have found no notifications to your team even if a certain pipeline has failed.
You want to set up a feature so that your on-call team can get an email and an SMS when the whole pipeline or certain stage inside the pipeline changes the state to “FAILED”
Which combinations of services should you use to implement this? (Select TWO.)
Click on the arrows to vote for the correct answer
A. B. C. D. E.Correct Answer - A, C.
Amazon CloudWatch Events can be used to detect and react to changes in the state of a pipeline, stage, or action.
Then, based on rules, CloudWatch Events invokes one or more target actions when a pipeline, stage, or action enters the specified state.
An SNS topic can be configured as a target for the above CloudWatch Events rule.
Then users can create subscriptions of Email or SMS to this new topic so that the on-call team will be notified when the state changes to unsuccessful.
Option A and C are CORRECT: For CodePipeline, CloudWatch Events rule supports the state change of pipeline, stage or action:
The relevant CodePipeline documentation can be found in https://docs.aws.amazon.com/codepipeline/latest/userguide/detect-state-changes-cloudwatch-events.html.
Options B, D, E are incorrect: Refer to the above explanations.
To implement the desired feature of getting email and SMS notifications when a pipeline or stage fails in AWS CodePipeline, we can use AWS Simple Notification Service (SNS) and AWS CloudWatch Events.
AWS Simple Notification Service (SNS) is a fully managed messaging service that enables you to send notifications to recipients or other applications. We can use SNS to send email and SMS messages to the on-call team when a pipeline or a stage fails.
AWS CloudWatch Events is a service that enables you to respond to changes in AWS resources. It can detect state changes in AWS services and react to them. We can create a CloudWatch Event rule that listens for changes in the state of the pipeline or the stage, and when a failure is detected, it can trigger a notification to be sent to the SNS topic.
Therefore, to implement the desired feature, we can follow the below steps:
Therefore, the correct answers are A (AWS Simple Notification Service) and C (AWS CloudWatch Events). AWS CloudTrail is not relevant here because it is a service that logs API activity in your AWS account. AWS Simple Queue Service is not relevant here because it is a service for queuing and processing messages. AWS CloudWatch Alarms are not relevant here because they are used to monitor metrics and take actions based on predefined thresholds.