Question

Difficulty: MediumAWS CodePipeline

A developer is managing a continuous delivery pipeline in AWS CodePipeline that consists of Source, Build, Test, and Production stages. The developer needs to temporarily stop code changes from being deployed to the Production stage while allowing developers to continue committing code and verifying builds in the Test stage. Additionally, the developer must configure the system to send email alerts to the operations team whenever any stage in the pipeline fails. Which combination of actions should the developer take to meet these requirements? (Select TWO.)

  1. Disable the inbound transition on the Production stage in AWS CodePipeline.Answer
  2. Create an Amazon EventBridge rule that filters for CodePipeline stage execution failures and targets an Amazon Simple Notification Service (Amazon SNS) topic subscribed to by the operations team.Answer
  3. C
    Disable the inbound transition on the Test stage in AWS CodePipeline.
  4. D
    Update the trust policy of the CodePipeline service role to allow the sns.amazonaws.com service principal to assume the role.
  5. E
    Store the email notification settings as a SecureString parameter in Systems Manager Parameter Store and configure CodePipeline to retrieve it to publish notifications.

Answer

Disable the inbound transition on the Production stage in AWS CodePipeline, and create an Amazon EventBridge rule that filters for CodePipeline stage execution failures and targets an Amazon Simple Notification Service (Amazon SNS) topic subscribed to by the operations team.
To satisfy the deployment restriction requirement, disabling the inbound transition on the Production stage ensures that new changes can propagate through Source, Build, and Test but will not enter Production. To satisfy the email alert requirement, creating an EventBridge rule that filters on failed stage executions and targets an SNS topic is the correct and standard integration pattern.

Step-by-Step Solution

1
Identify the stage transition control mechanism in AWS CodePipeline.
Disabling the transition into the Production stage stops new executions from entering the Production stage while keeping transitions between Source, Build, and Test active.
This satisfies the requirement to allow developers to continue committing code and running tests without deploying to production.
2
Identify the notification mechanism for pipeline failures.
An Amazon EventBridge rule is created to detect CodePipeline Stage Execution State Changes where the state is FAILED.
EventBridge can trigger an Amazon SNS topic to send emails to the operations team, which is the standard event-driven approach for CodePipeline notifications.

Key Concept

AWS CodePipeline stage transitions and EventBridge notifications integration
Rate this question