A media streaming company uses AWS Organizations to manage its multi-account environment. The security team enforces that all VPC security groups in member accounts are deployed and updated exclusively via a centralized CI/CD pipeline using AWS CloudFormation StackSets from a central Administration account. The security team must implement a solution to detect any manual modifications to these security groups, automatically revert the resources to their template-defined state, and log the remediation details to a centralized Amazon S3 bucket in a Security account. The S3 bucket must be encrypted, and all operations must adhere to the principle of least privilege. Which strategy should a solutions architect implement to meet these requirements?
- AApply a Service Control Policy (SCP) at the Organizational Unit (OU) level that denies ec2:AuthorizeSecurityGroupIngress and ec2:RevokeSecurityGroupIngress for all IAM identities except the CloudFormation execution role, assuming this SCP will automatically revert any unauthorized manual changes to the security groups and write log entries to the central S3 bucket.
- BDeploy an AWS Config rule to monitor the security groups for drift. Configure the AWS Config rule to trigger an AWS Systems Manager (SSM) Automation runbook. Store the SSM execution logs in the Security account's Amazon S3 bucket encrypted with the default AWS-managed KMS key (aws/s3), and configure the bucket policy to delegate cross-account access to the member account roles.
- Deploy an AWS Config rule to monitor the security groups for drift. Configure the AWS Config rule to trigger an AWS Systems Manager (SSM) Automation runbook. The runbook assumes a cross-account IAM role to execute remediation. Store the SSM execution logs in the Security account's Amazon S3 bucket encrypted with a KMS Customer Managed Key (CMK) whose key policy grants kms:GenerateDataKey and kms:Decrypt permissions to the member account roles.Cevap
- DConfigure an Amazon EventBridge rule that detects manual security group modifications in AWS CloudTrail logs, and trigger an AWS Systems Manager Run Command script to run local AWS CLI commands in the member accounts to overwrite rules, bypassing the CloudFormation stack's state.