An enterprise manages its multi-account environment under AWS Organizations. A central platform team uses AWS CloudFormation StackSets to deploy and update web application stacks across all member accounts. Recently, security audits revealed that local administrators in several member accounts have manually added inbound rules to their Application Load Balancer (ALB) security groups to troubleshoot connectivity, introducing security vulnerabilities and causing configuration drift.
The platform team wants to prevent unauthorized changes to the security groups while allowing CloudFormation StackSets to update them. Additionally, any existing drift on the security groups must be detected and automatically reverted without redeploying the entire application stack.
Which two actions should the Solutions Architect take to meet these requirements? (Select two.)
- Configure AWS Config in each member account with the vpc-sg-open-only-to-authorized-ports managed rule, and specify an AWS Systems Manager Automation runbook as a remediation action to automatically remove unauthorized rules.Answer
- Implement a Service Control Policy (SCP) at the organizational level that denies ec2:AuthorizeSecurityGroupIngress and ec2:RevokeSecurityGroupIngress actions unless the caller principal is the CloudFormation StackSets execution role.Answer
- CEnable AWS CloudFormation drift detection on the StackSets and configure an Amazon EventBridge rule that triggers an automatic stack update using the UpdateStack API with the previously deployed template whenever drift is detected.
- DApply a Service Control Policy (SCP) to the member account Organizational Units (OUs) that explicitly grants the AWS CloudFormation StackSets execution role permission to modify security groups, assuming this overrides local IAM policies.
- ECreate a custom KMS key policy using the AWS-managed KMS key for Amazon EC2 (aws/ec2) in the management account to allow cross-account access for the CloudFormation StackSets execution role, securing the templates during deployment.