A financial services company needs to ensure that all Amazon EC2 security groups in its production environment are continuously audited for security compliance. Specifically, any rule that allows inbound traffic from the public internet (0.0.0.0/0) on port 22 must be flagged, and the security team must be notified immediately. Which solution meets these requirements with the least operational overhead?
- AConfigure a stateless Network ACL at the subnet level to block all incoming traffic on port 22, and use VPC Flow Logs to trigger an Amazon SNS notification when a connection is rejected.
- BDeploy AWS Shield Advanced on the EC2 instances to monitor port 22 traffic, and configure it to automatically remove any security group rules that allow public SSH access.
- Enable AWS Config, configure the managed rule to check for restricted SSH access, and use Amazon EventBridge to route non-compliant compliance change events to an Amazon Simple Notification Service (Amazon SNS) topic.Answer
- DConfigure Amazon GuardDuty to monitor AWS CloudTrail logs for security group changes, and write a custom AWS Lambda function to revert any changes that allow port 22 access.
Answer
The correct solution is to enable AWS Config, configure the managed rule to check for restricted SSH access, and use Amazon EventBridge to route non-compliant compliance change events to an Amazon SNS topic.
AWS Config is designed specifically for tracking resource configuration changes and auditing compliance against rules. The managed rule for restricted SSH access checks security group ingress rules, and EventBridge can publish non-compliant states directly to SNS. This native integration requires no code and minimizes operational overhead.
Step-by-Step Solution
Key Concept
AWS Config is the primary tool for resource configuration compliance auditing and drift detection, whereas GuardDuty is for active threat detection and Shield is for DDoS mitigation.
Estimated Time:1m 30s