A financial services company manages its infrastructure across multiple AWS accounts within an AWS Organization. A central operations account is used to deploy and manage a standardized baseline of VPC security groups across all member accounts using AWS CloudFormation StackSets. The templates are stored in an Amazon S3 bucket in the operations account, which is encrypted using an AWS KMS key. The security policy requires that any manual modifications to these managed security groups in the member accounts must be automatically detected and remediated within one hour. Additionally, updates to the security group baseline templates must be rolled out incrementally; if a deployment fails in any single member account, the rollout must stop immediately and the affected account must be rolled back, without impacting other compliant accounts. Which combination of actions will meet these requirements in the most secure and automated manner?
- Encrypt the S3 bucket using a Customer Managed Key (CMK) and configure its key policy to allow cross-account access for the member accounts. Deploy the AWS Config managed rule 'cloudformation-stack-drift-detection-check' across all member accounts using an organization conformance pack. In the operations account, configure an Amazon EventBridge rule that triggers on compliance status change events from an AWS Config aggregator. Set the rule target to an AWS Systems Manager Automation document that executes the 'UpdateStackInstances' API with deployment targeting parameters set to the specific drifted account and region. During template updates, set the StackSet deployment preferences FailureToleranceCount to 0 and MaxConcurrentCount to 1.Cevap
- BEncrypt the S3 bucket using the default AWS-managed key for Amazon S3 (aws/s3). Deploy the AWS Config managed rule 'cloudformation-stack-drift-detection-check' in each member account. Configure an Amazon EventBridge rule in each member account that triggers a local AWS Lambda function to delete the drifted security groups and recreate them via the AWS CLI. During template updates, configure the StackSet deployment preferences to use an AWS CodeDeploy linear canary deployment strategy with dynamic rollback alarms.
- CEncrypt the S3 bucket using a Customer Managed Key (CMK) and configure its key policy to allow cross-account access. Attach a Service Control Policy (SCP) to the root of the AWS Organization that denies the 'ec2:AuthorizeSecurityGroupIngress' and 'ec2:RevokeSecurityGroupIngress' actions for all IAM roles except for the CloudFormation service-linked role. Use an AWS Config rule to monitor the configuration. During template updates, deploy the StackSets with a FailureToleranceCount of 0 and a MaxConcurrentCount of 100% to ensure simultaneous updates and rapid validation.
- DEncrypt the S3 bucket using a Customer Managed Key (CMK) and configure its key policy to allow cross-account access. Configure AWS CloudFormation drift detection at the StackSet level and set up an AWS Systems Manager State Manager association to trigger drift detection daily. If drift is detected, configure the automation to run the 'DeleteStackInstances' API for the drifted account and region, followed by 'CreateStackInstances' to recreate them. During template updates, set the StackSet deployment preferences FailureToleranceCount to 5 and MaxConcurrentCount to 1.