Publish Standard Order & Verify Fan-Out
After setting up and verifying the subscriber endpoint, in this section you will place a standard beverage order (small quantity, quantity = 1) through The Cozy Brew web interface. You will observe how AWS Lambda publishes the event to Amazon SNS and witness the first distribution branch of the Fan-Out pattern: an instant order confirmation receipt sent directly to the customer’s email inbox.
Publish a Standard Order via The Cozy Brew Web App
- Open The Cozy Brew website in your browser (using the
WebsiteURL obtained from CloudFormation Outputs).
- Ensure that the Order API Endpoint bar has saved your Lambda Function URL address.
- Select a beverage: for example, Vietnamese Iced Latte.
- Choose a cup size: Cup Size: M (350ml).
- Set quantity: Quantity: 1.
- Enter the customer name under Customer Name and any optional notes (e.g.,
Oat milk, extra shot).
- Click the Place Order & Publish Event button.

- Observe the real-time visual feedback on screen:
- The button transitions to Publishing Event to AWS…
- On the interactive AWS Architecture Event Flow diagram, the Client Browser, Lambda, SNS Topic, Email Alert, and BaristaQueue nodes illuminate simultaneously with a green glow.
- A floating toast notification appears in the lower corner confirming:
Event published successfully: COZY-XXXXXX.
- The status box displays: Success! Standard Order (1 items) routed to BaristaQueue.

Verify Message Delivery in Email Inbox
- Open the email inbox you used to register the subscription in section 3.1.
- Within 2 to 3 seconds, a new email from The Cozy Brew will arrive in your inbox.
- Subject line:
[The Cozy Brew] Order Confirmation - COZY-XXXXXX.
- Click to open the email and view the complete order details: Order ID, beverage name, cup size, quantity, custom brewing notes, and order timestamp.

Asynchronous Nature:
The email delivered to you via Amazon SNS is completely decoupled from whether the barista has begun brewing the drink. Even when the barista station is preparing hundreds of cups concurrently, the customer receives their order confirmation immediately with zero lag.