Developers are prohibited from launching VPC network infrastructure. Whenever a NAT gateway is created, the network security team must immediately be alerted to terminate it. The solution should be easy to deploy across multiple AWS accounts, have minimal admin overhead, and provide an accessible compliance history. Which solution satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a custom AWS Config rule that checks for NAT gateways in an AWS account. Configure the AWS Config rule to perform an AWS Systems Manager Automation remediation action to send an email alert and terminate the NAT gateway if a NAT gateway is detected. Deploy the AWS Config rule and the Systems Manager runbooks to each account by using AWS CloudFormation StackSets.
Why this is the answer
The correct answer leverages AWS Config, Systems Manager Automation, and CloudFormation StackSets for a robust, scalable, and compliant solution. AWS Config provides continuous monitoring and compliance history, automatically triggering a Systems Manager Automation runbook to terminate the NAT Gateway and send alerts. CloudFormation StackSets enable easy, consistent deployment across multiple accounts with minimal administrative overhead. The other options are less suitable: Developing a script on EC2 instances in each account is high overhead, lacks centralized compliance history, and is not easily scalable. A Lambda function deployed with SAM is better, but storing results in OpenSearch Service in each account adds complexity and cost compared to Config's built-in history. GuardDuty is for threat detection, not for enforcing resource provisioning policies. While it can detect NAT gateway creation, it's not the primary service for this type of compliance enforcement, and Step Functions adds unnecessary complexity for this specific task.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed