A developer is configuring a continuous release pipeline in AWS CodePipeline for a web application. The pipeline must include a manual approval stage before deploying the application to production, which should notify the operations team. Additionally, the subsequent build and deployment stage in AWS CodeBuild requires a database API key that must be rotated automatically every 30 days. Which combination of steps should the developer perform to meet these requirements securely? (Select TWO.)
- Create an Amazon SNS topic, subscribe the operations team's email addresses, and associate the SNS topic ARN with the manual approval action in CodePipeline.Answer
- Store the database API key in AWS Secrets Manager, enable automatic rotation, and retrieve the secret in the CodeBuild buildspec file using the Secrets Manager integration.Answer
- CStore the database API key in AWS Systems Manager Parameter Store as a SecureString parameter, configure automatic 30-day rotation on the parameter, and reference it in CodeBuild.
- DModify the CodePipeline service role's trust policy to include the operations team's IAM user ARNs, enabling them to receive approval notifications directly.
- EAdd the database API key plaintext value directly to the buildspec.yml file in the root of the source repository so CodeBuild can read it during the build.
Answer
Create an Amazon SNS topic, subscribe the operations team's email addresses, and associate it with the manual approval action; and store the database API key in AWS Secrets Manager with automatic rotation enabled, retrieving it during the build phase.
To satisfy the requirements, the developer must use an Amazon SNS topic subscribed to the operations team's email addresses and link it to the manual approval action. For the secret requiring rotation, storing the key in AWS Secrets Manager with automatic rotation enabled satisfies the 30-day rotation requirement and can be securely retrieved by CodeBuild at runtime.
Step-by-Step Solution
Key Concept
AWS CodePipeline manual approvals and secure secret rotation integration with CodeBuild