Exams / SOA-C03 / Event-driven automation / Question 1
SOA-C03 practice question: Event-driven automation
Deployment, Provisioning, and Automation A free question from our original SOA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A ski resort's guests upload photos to an S3 bucket. An S3 Event Notification for all object-created events invokes a Lambda function that writes a resized copy of each photo back into the same bucket. After the function was deployed, Lambda invocations and S3 request costs rose sharply, and resized copies of resized copies started to appear. What should a CloudOps engineer do to fix this?
Choose one answer.
- AA. Set the function's reserved concurrency to 10 so that the number of copies the function can create at once is limited.
- BB. Turn on S3 Versioning so that each resized copy is stored as a new version of the original rather than as a new object.
- CC. Replace the S3 Event Notification with an EventBridge rule that matches Object Created events from the bucket.
- DD. Upload to an uploads/ prefix, filter the notification on it, and write resized copies to resized/.
Show the answer and explanation
Answer: D
Explanation
A function that writes back to the same location that triggers it creates a recursive loop. Separate input and output with key name prefix filters or a second bucket so that the function's writes do not match the trigger. Lambda can detect and stop some recursive loops, but the design should not rely on that.
Study
Keep practicing
Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.