An e-commerce corporation hosts its microservices across multiple AWS accounts structured under an AWS Organization. To automate resource provisioning, the DevOps team utilizes AWS CloudFormation StackSets initiated from a central release account. The templates and software packages are stored in a shared Amazon S3 bucket in this central release account. Recently, engineering teams in individual production accounts have performed ad-hoc manual adjustments to their VPC configuration and security group rules, causing subsequent automated stack updates to fail. The security compliance guidelines demand that the shared S3 bucket must be encrypted at rest, and cross-account access must adhere strictly to the principle of least privilege. Which two actions should a solutions architect perform to establish automated drift remediation and ensure secure, seamless cross-account deployment pipeline execution?
- Encrypt the shared Amazon S3 bucket in the central release account using a Customer Managed Key (CMK), and configure the key policy to grant the AWS CloudFormation StackSet execution roles in the target member accounts permissions to perform the kms:Decrypt action.Answer
- Implement an AWS Config organizational rule across all accounts to detect resource non-compliance, and configure an AWS Systems Manager Automation runbook to automatically remediate any unauthorized changes.Answer
- CEncrypt the shared Amazon S3 bucket in the central release account using the default AWS-managed S3 key (aws/s3), and apply an Organization-level Service Control Policy (SCP) that allows target member account execution roles to perform KMS decryption operations on the key.
- DEstablish an Organization-level Service Control Policy (SCP) that overrides local IAM policies in target member accounts, directly granting the central release account pipeline identity permission to provision resources without local cross-account execution roles.
- EConfigure AWS Systems Manager State Manager in the target member accounts to execute an Ansible playbook that forcibly deletes and recreates any drift-detected resources hourly, ensuring compatibility with the StackSet templates without triggering CloudFormation stack updates.
- FSet up AWS CodeDeploy in the central release account to manage CloudFormation template deployments using a linear deployment strategy, and trigger automated rollbacks using AWS Config alerts when configuration changes occur.