AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A company is migrating an on-premises order-processing system to AWS. Orders are stored in an Amazon DynamoDB table that has a stream enabled. As part of a modernization effort, the architects want to replace a custom polling service with a fully managed, event-driven integration layer that meets the following requirements:
- Downstream microservices must react only when an order's status changes to "SHIPPED".
- The same event must invoke an AWS Lambda function that updates internal systems and be forwarded to Stripe for billing through a supported SaaS integration.
- Event sequence must be preserved for each individual OrderID.
- The solution must scale automatically to thousands of events per second without the team managing servers, containers, or external queue infrastructure.
- The amount of custom code and operational overhead should be minimized.
Which approach best fulfills these goals?
Create an SQS FIFO queue as the stream destination. Deploy an Amazon ECS Fargate service that polls the queue, filters for SHIPPED records, and invokes the Lambda function and Stripe's REST API.
Build a scheduled AWS Step Functions state machine that scans the DynamoDB table each minute, checks the status attribute, and then calls the Lambda function and Stripe's billing API from separate Task states.
Configure an Amazon EventBridge Pipe that uses the DynamoDB stream as its source, applies an event pattern matching NewImage.status == "SHIPPED", and targets an EventBridge custom event bus. Create rules on that bus to invoke the Lambda function and forward the same event to the Stripe partner event bus.
Invoke a Lambda function from the DynamoDB stream to publish every record to an Amazon SNS FIFO topic. Use attribute-based filter policies on the topic to trigger the Lambda function and send HTTPS calls to Stripe.