Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

Building and Troubleshooting a Serverless Web Application

In this hands-on lab, we are going to build and troubleshoot a serverless web application using the following technologies: * DynamoDB * Lambda * API Gateway * S3 * X-Ray

Google Cloud Platform icon

Path Info

Clock icon Intermediate
Clock icon 30m
Clock icon Jun 17, 2022

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create a DynamoDB Table

    1. Create the DynamoDB table and populate it using the file named items.json. All files required for this hands-on lab are located in the folder named Building_and_Troubleshooting_a_Serverless_Web_Application that you will find in the following GitHub repository.
  2. Challenge

    Create a Lambda Function with an API Gateway Endpoint

    1. Create a Lambda function
    2. Configure the Lambda to use Python 3.9 and 256 MB.
    3. Test the function to see if it works.
    4. Diagnose and fix an error with the function configuration.
    5. Add an API gateway endpoint to your function; make sure you select a REST API.
    6. Test that the API gateway can be used to invoke your Lambda function.
  3. Challenge

    Create an S3 Bucket and Upload the Website Files

    1. Modify index.html to add the invoke URL of your API Gateway endpoint.
    2. Create an S3 bucket with public access enabled.
    3. Upload the following website files to your bucket. Make sure they have public-read enabled: index.html, error.html, and cookie.html
    4. Configure S3 static website hosting on your S3 bucket.
    5. Check you can access everything from the S3 website-hosting URL.
  4. Challenge

    Configure X-Ray

    1. Enable tracing from within the Lambda function.
    2. Enable the API gateway endpoint to send traces.
    3. Add the Lambda Layer to your function using the file named Make sure to use Python 3.9.
    4. Update your Lambda function code to import the X-Ray SDK to your function using the snippet provided named
    5. Test the function to see if it works.
    6. Diagnose and fix an error with the function configuration.
  5. Challenge

    Review The X-Ray Service Map

    1. Generate some traffic to your website.
    2. Review the X-Ray service map and traces.
    3. Break the application and see the results displayed in X-Ray.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans