Grant the report Lambda Security Hub read-only access because findings are already in Security Hub
Short answer
B Attach AWSSecurityHubReadOnlyAccess; the Lambda reads findings from Security Hub, so Inspector access is unnecessary.
Question
Key Takeaways
The Lambda consumes findings from Security Hub, not by calling Inspector APIs, so Inspector permissions are unnecessary. The least-privilege fix is Security Hub read-only access (AWSSecurityHubReadOnlyAccess). Granting Inspector read as well (option C) or a broad custom Batch* policy (option D) exceeds what the function needs.
A Lambda builds a daily report from Amazon Inspector findings that are stored in AWS Security Hub. Because the data already resides in Security Hub, the function only needs permission to read Security Hub findings—not Amazon Inspector directly. Attaching the AWS managed AWSSecurityHubReadOnlyAccess policy to the execution role gives exactly the read access required with least privilege, fixing the failure without over-granting.
Common mistake: Granting both Inspector and Security Hub read access (option C) on the assumption the function needs Inspector—it reads findings from Security Hub, so Inspector access is surplus. Or a custom policy with Batch* actions (option D), which is broader than read-only and riskier.
Expert Analysis
Why the Answer Is Correct
The Lambda gathers Inspector findings that are already aggregated in Security Hub, so it needs only Security Hub read permissions. Attaching AWSSecurityHubReadOnlyAccess to the execution role provides precisely that, adhering to least privilege and resolving the access failure without granting Inspector or write capabilities.
Why the Other Options Are Wrong
A (resource-based policy allowing Security Hub to invoke Lambda) addresses invocation, not the data-read permission the function lacks. C grants read to both Inspector and Security Hub, exceeding least privilege since the data is in Security Hub. D uses a custom policy with Batch* permissions, which is broader than read-only and less aligned with least privilege than the managed read-only policy.
Community Comment Notes
Community split B (43) vs C (43). The least-privilege argument favors B: findings are already in Security Hub, so only SH read is needed; C over-grants Inspector. A commenter noted D's Batch* is a problem and B's managed policy is read-only. B is the minimal, correct grant.
Official Reference
https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-access.html
This link opens the official vendor documentation in a new tab.
Community Votes
50% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 10 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 10
-
HappyG 👍 3 Answered CC grants the Lambda function's execution role the necessary permissions to read from both Amazon Inspector and AWS Security Hub, but not granting excessive permissions. This approach adheres to the principle of least privilege by providing only the necessary permissions for the Lambda function to perform its task.
-
Pmktechno 👍 3 Answered CThis approach ensures that the Lambda function has the necessary permissions to read data from Amazon Inspector and Security Hub without granting excessive permissions. It aligns with the principle of least privilege by only allowing the specific actions required for the Lambda function to perform its task.
-
8acf42c 👍 3 Answered CBy explicitly granting read-only permissions to both Amazon Inspector and Security Hub, the Lambda function will have the least privilege access it needs to retrieve findings and generate the report. This aligns with best practices.
-
723993f 👍 3 Answered Dis it not D ? or is the Batch:* a problem ? but i think there are no batch write/delete operations that can be performed on that resource arn anyways
-
jdx000 👍 3 Answered Bthe findings are already in security hub, so only read access to security hub is needed
Show 5 more comments
-
Asma2023 👍 2 Answered Bbeacause findings are already stored in AWS Security HUB
-
SCSC02Q 👍 1 Answered Bits B, since the Batch on D is a problem, enabling more the read access. In comparison, B provides only BatchGet so ok.
-
TareDHakim 👍 1 Answered BB, there's no need for permissions to Inspector as logs already populated in Security Hub.
-
SCSC02Q 👍 1 Answered B* enabling more than read access...
-
Palanda 👍 1 Answered BI agree with b
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.