SOA-C03 · Question #149
A company needs to log and audit any principal that publishes messages to Amazon Simple Notification Service (Amazon SNS) topics and Amazon Simple Queue Service (Amazon SQS) queues. The company…
The correct answer is B. Set up AWS CloudTrail. Enable tracking of data events for Amazon SNS and Amazon SQS. D. Configure VPC endpoints for Amazon SNS and Amazon SQS. Inspect the vpcEndpointId field in. To audit principals publishing to SNS and SQS and enforce VPC endpoint usage, CloudTrail data events provide the API call logging, while inspecting the vpcEndpointId field in CloudTrail logs confirms traffic traversed the VPC endpoint.
Question
A company needs to log and audit any principal that publishes messages to Amazon Simple Notification Service (Amazon SNS) topics and Amazon Simple Queue Service (Amazon SQS) queues. The company wants to ensure that all communication with these services uses VPC endpoints. Which combination of solutions will meet these requirements? (Choose two.)
Options
- AUse Amazon CloudWatch Logs to collect message content from Amazon SNS and Amazon SQS.
- BSet up AWS CloudTrail. Enable tracking of data events for Amazon SNS and Amazon SQS.
- CCreate Amazon EventBridge rules to gather Amazon SNS and Amazon SQS events. Store the
- DConfigure VPC endpoints for Amazon SNS and Amazon SQS. Inspect the vpcEndpointId field in
- EConfigure VPC endpoints for Amazon SNS and Amazon SQS. Inspect the vpcEndpoint field in
How the community answered
(39 responses)- A3% (1)
- B77% (30)
- C8% (3)
- E13% (5)
Why each option
To audit principals publishing to SNS and SQS and enforce VPC endpoint usage, CloudTrail data events provide the API call logging, while inspecting the vpcEndpointId field in CloudTrail logs confirms traffic traversed the VPC endpoint.
Amazon CloudWatch Logs captures application and infrastructure logs but does not natively collect SNS/SQS API call metadata or principal identity information needed for auditing who published messages.
AWS CloudTrail with data events enabled for SNS and SQS records every API call (including Publish and SendMessage), capturing the principal identity (IAM user, role, etc.), timestamp, and request metadata, which satisfies the auditing and logging requirement for all principals interacting with these services.
Amazon EventBridge can capture certain service events but does not provide the detailed API-level audit trail of every principal making Publish or SendMessage calls that CloudTrail data events provide.
Configuring VPC endpoints (Interface endpoints) for SNS and SQS ensures traffic stays within the AWS network, and CloudTrail data event records include the vpcEndpointId field when a request traverses a VPC endpoint, allowing verification that all communication used the endpoint rather than the public internet.
The correct field name in CloudTrail logs to identify VPC endpoint usage is vpcEndpointId, not vpcEndpoint; inspecting an incorrect field name would not reliably confirm that traffic used the VPC endpoint.
Concept tested: CloudTrail data events and VPC endpoint enforcement for SNS/SQS
Source: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html
Topics
Community Discussion
No community discussion yet for this question.