Configure The Cozy Brew Web App

In this step, we will upload the frontend client source code (index.html) to Amazon S3 and connect the interface to our provisioned AWS Lambda Function URL endpoint.


Upload index.html to Amazon S3

You can download the frontend application source code from the attachment below:

  • index.html (33 KB)
  • Upload index.html to S3 Bucket

    Upload via AWS Management Console

    1. In the AWS Console search bar, type S3 and select the S3 service.
    2. In the Buckets list, click on your bucket name (beginning with aws-event-driven-architectures-wo-coffeeshopbucket-... retrieved from the S3BucketName field in the Outputs tab).
    3. Click the Upload button.
    4. Click Add files and select the downloaded index.html file.
    5. Scroll to the bottom and click Upload.

    Upload index.html to S3 Bucket

    Upload index.html to S3 Bucket

    Upload index.html to S3 Bucket

    Upload index.html to S3 Bucket

    Upload index.html to S3 Bucket

    Ensure that Block Public Access for your S3 bucket is set to “OFF”, as this state is required for public website access.

    Access The Cozy Brew Website on S3


    Launch The Cozy Brew Frontend

    1. Return to the CloudFormation stack Outputs tab and find the WebsiteURL output value.
    2. Click the link or copy and paste it into your browser (e.g., http://<S3BucketName>.s3-website-ap-southeast-1.amazonaws.com).
    3. The Cozy Brew coffeehouse web interface will appear interactively in your browser:

    Access The Cozy Brew Website on S3

    Access The Cozy Brew Website on S3

    Access The Cozy Brew Website on S3

    If you click the link but the website does not display as shown in the screenshot, please reload the page or click directly on the URL instead of pressing Ctrl + Click.


    Connect the Order API Endpoint

    1. Return to the CloudFormation Outputs tab and copy the value of the OrderApiUrl field (formatted as https://<id>.lambda-url.ap-southeast-1.on.aws/).
    2. In the Order API Endpoint bar at the top of the web application, paste the copied URL into the input field.
    3. Click the Save Endpoint button.

    Save Order API Endpoint on Web

    Save Order API Endpoint on Web

    A toast notification “Order API Endpoint saved successfully!” will appear. This endpoint is saved automatically in browser local storage for use throughout all subsequent testing steps.

    Interactive Web App Features:

    • Real-Time Order Total: Dynamically calculates order pricing based on beverage selection, cup size (S, M, L), and quantity.
    • Event Flow Topology Diagram: Visually highlights in-flight events as they traverse Browser, Lambda, SNS, Email, and SQS queues in real time.
    • Filter Policy Banner: Automatically alerts you when quantity reaches 5 or more, signaling that the SNS VIP Filter Policy is being activated!