A platform team is automating the deployment of a microservice on Amazon ECS (Fargate) across multiple AWS accounts. The CI/CD pipeline is hosted in a centralized tooling account using AWS CodePipeline. The pipeline must deploy the microservice to a production account using AWS CodeDeploy with a canary strategy that shifts 10% of traffic immediately, waits for 15 minutes, and then shifts the remaining 90% of traffic if no alarms are triggered. The deployment must automatically roll back if any Amazon CloudWatch alarms are triggered in the production account during the deployment. The pipeline artifact S3 bucket in the tooling account is encrypted. Which configuration should the platform team implement to meet these requirements securely and automatically?
- Configure the AWS CodeDeploy deployment group in the production account with the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration and specify the production CloudWatch alarms for rollback. Encrypt the S3 artifact bucket in the tooling account using a customer managed AWS KMS key, and configure the KMS key policy to allow the cross-account CodeDeploy execution role to decrypt the artifacts.Answer
- BConfigure the AWS CodeDeploy deployment group in the production account with the CodeDeployDefault.ECSLinear10PercentEvery15Minutes deployment configuration and configure an AWS Lambda function to monitor production CloudWatch alarms and manually call the StopDeployment API. Encrypt the S3 artifact bucket in the tooling account using a customer managed AWS KMS key, and configure the KMS key policy to allow the cross-account CodeDeploy execution role to decrypt the artifacts.
- CConfigure the AWS CodeDeploy deployment group in the production account with the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration and specify the production CloudWatch alarms for rollback. Encrypt the S3 artifact bucket in the tooling account using the default AWS-managed S3 key (aws/s3), and configure an IAM policy on the production account's CodeDeploy execution role to decrypt the artifacts.
- DConfigure AWS CloudFormation StackSets to deploy the task definition and service directly to the production account. Use a rolling deployment strategy by updating the stack, and configure an administrator to manually revert the task definition to the previous version in the Amazon ECS console if production CloudWatch alarms are triggered. Encrypt the S3 artifact bucket in the tooling account using a customer managed AWS KMS key.