AWS Certified Security – Specialty (SCS-C02) — Question 221

A company wants to automate the creation of a security report. The company has an AWS Lambda function that gathers data from Amazon Inspector findings stored in AWS Security Hub in the us-west-2 Region. The Lambda function then needs to create a daily report by using an Amazon EventBridge schedule.

A security engineer discovers that the Lambda function is failing to create the report. The security engineer must implement a solution that corrects the issue and provides least privilege permissions.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

The correct answer is B because attaching the AWSSecurityHubReadOnlyAccess AWS managed policy to the Lambda function’s execution role grants it the necessary read-only permissions to access Security Hub data without overprivileging. Option A is incorrect as it does not provide adequate permission management. Option C might not grant sufficient permissions tailored specifically for Security Hub. Option D could grant excessive permissions not aligned with the least privilege principle.