How Does S3 Trigger API Gateway When a New Object Is Uploaded?
A company has an Amazon S3 bucket where users upload feedback items. The company also has an Amazon API Gateway REST API that processes feedback notifications. The company needs a solution that automatically calls the API Gateway REST API when new feedback items are uploaded to the S3 bucket. Which solution will meet these requirements?
Community Insight
The test is knowing S3's supported notification destinations (SNS, SQS, Lambda, EventBridge) and which services can actually invoke API Gateway — the trap is assuming API Gateway is itself an S3 notification destination.
Amazon S3 event notifications cannot deliver directly to an API Gateway REST API, so the upload event must be routed through EventBridge, whose rules can invoke API Gateway as a target. This page explains why option B is the only workable design among the four choices.
Many candidates pick option A, assuming S3 can send an event notification straight to API Gateway; API Gateway is not a supported S3 notification destination, and s3:ObjectAcl:Put is the wrong event type for a new upload anyway.
Community Discussion (1 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Amazon S3 event notifications support a fixed set of destinations: Amazon SNS topics, Amazon SQS queues, AWS Lambda functions, and Amazon EventBridge. API Gateway is not one of them. Option B routes the ObjectCreated event to EventBridge as the destination, then uses an EventBridge rule that matches the S3 event and invokes the API Gateway REST API as a target — API Gateway is a documented EventBridge target type for REST APIs, and EventBridge targets support authorization via IAM roles or API keys. This decouples the bucket from the API, adds filtering and retry capability, and satisfies the requirement to call the API automatically on each new feedback item.
Why the Other Options Are Wrong
Option A fails twice: API Gateway cannot be selected as an S3 event notification destination, and s3:ObjectAcl:Put fires on ACL changes rather than on object creation, so uploads would not trigger anything. Option C is invalid because Lambda@Edge is a CloudFront feature — it runs on viewer and origin request/response events at edge locations, and S3 event notifications cannot target a Lambda@Edge function. Option D breaks down at the last step: Amazon SQS has no push mechanism to API Gateway; consumers must poll the queue themselves (for example with a Lambda function or an EC2 worker) before calling the API, so the automatic invocation requirement is unmet.
Community Comment Notes
Community reaction to this item is essentially unanimous in favour of option B, with Bad_Mat stating "The correct answer is B" and walking through the notification-to-EventBridge-then-rule pattern. That matches the architecture the question is looking for: S3 emits, EventBridge filters and routes, API Gateway is invoked. Learners who argued for A were usually conflating S3 with services that expose public HTTPS endpoints, and no commenter produced evidence that API Gateway is a valid S3 notification destination. The consensus here aligns with vendor documentation rather than mere vote counting.
Official Reference
Exam Strategy
When an S3 trigger question involves a target that is not SNS, SQS, Lambda, or EventBridge, immediately look for the EventBridge option — SOA-C03 frequently tests this 'unsupported direct destination' pattern. Also check the event type: object creation needs ObjectCreated:Put/Post, not ObjectAcl:Put.
Frequently Asked Questions
Why can't S3 event notifications call an API Gateway REST API directly?
S3 only supports SNS, SQS, Lambda, and EventBridge as notification destinations. API Gateway is not on that list, so the event must be relayed by EventBridge.
Why doesn't the s3:ObjectAcl:Put event work in option A?
ObjectAcl:Put fires only when an object's ACL changes, not when a new feedback item is uploaded. Uploads generate ObjectCreated events instead.
Related Analysis
Practice All SOA-C03 Questions
Access 100 questions with complete answers and detailed explanations.
View Full SOA-C03 Practice Test →