AWS Certified Solutions Architect – Associate (SAA-C02) — Question 438
A solutions architect must provide an automated solution for a company's compliance policy that states security groups cannot include a rule that allows SSH from
0.0.0.0/0. The company needs to be notified if there is any breach in the policy. A solution is needed as soon as possible.
What should the solutions architect do to meet these requirements with the LEAST operational overhead?
Answer options
- A. Write an AWS Lambda script that monitors security groups for SSH being open to 0.0.0.0/0 addresses and creates a notification every time it finds one.
- B. Enable the restricted-ssh AWS Config managed rule and generate an Amazon Simple Notification Service (Amazon SNS) notification when a noncompliant rule is created.
- C. Create an IAM role with permissions to globally open security groups and network ACLs. Create an Amazon Simple Notification Service (Amazon SNS) topic to generate a notification every time the role is assumed by a user.
- D. Configure a service control policy (SCP) that prevents non-administrative users from creating or editing security groups. Create a notification in the ticketing system when a user requests a rule that needs administrator permissions.
Correct answer: B
Explanation
Using the AWS Config managed rule 'restricted-ssh' combined with Amazon SNS is the most efficient approach because it utilizes built-in AWS features to monitor and alert on compliance violations without writing custom code. Implementing a custom AWS Lambda function adds unnecessary development and maintenance overhead. Restricting security group access via SCPs or monitoring IAM roles does not directly address the need to automatically detect and notify on specific non-compliant security group configurations.