Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
    • Data
Google Cloud Platform icon
Labs

Deploying a Serverless Application Using AWS Lambda, API Gateway, and DynamoDB

During this hands-on lab you will explore how to create and host an entirely serverless application leveraging some of the most popular AWS offerings. You will deploy the application using an architecture that uses Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. Let's get building!

Google Cloud Platform icon
Lab platform
Lab Info
Level
Advanced
Last updated
Sep 23, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Create the DynamoDB Table

    Create a DynamoDB table with the following settings:

    • Table Name: Quotes
    • Partition Key Name: quote with type String
    • Sort Key Name: author with type String
    • Table settings: Customize settings
    • Table class: DynamoDB Standard
    • Read/write Capacity mode: Provisioned
    • Read Capacity Auto scaling: On
    • Minimum capacity units: 1, Maximum capacity units: 5, Target utilization (%) : 20
    • Write capacity Auto scaling: On
    • Minimum capacity units: 1, Maximum capacity units: 5, Target utilization (%) : 20
    • Encryption at rest: AWS managed key
  2. Challenge

    Create Lambda Functions

    Create two different Lambda functions to leverage with Amazon API Gateway.

    The code for each function is provided to you, so you do not need to type these manually.


    PutQuotes Function

    • Function Name: PutQuotes
    • Timeout: 1 Minute
    • Environment Variable Key: TABLE_NAME
    • Environment Variable Value: Quotes
    • New Execution Role Name: PutQuotesRole
    • Permissions Template: Simple microservice permissions (AWS sample)
    • Python Code

    GetQuotes Function

    • Function Name: GetQuotes
    • Timeout: 1 Minute
    • Environment Variable Key: TABLE_NAME
    • Environment Variable Value: Quotes
    • New Execution Role Name: GetQuotesRole
    • Permissions Template: Simple microservice permissions (AWS sample)
    • Python Code
  3. Challenge

    Create Regional REST API

    In Amazon API Gateway create a new API resource with the following information:

    • API Name: Quotes
    • API Type: Regional

    Now, create two new resources for use within the application. These resources should be created at the root (Example: /PutQuotes)

    Resource: PutQuotes

    • Resource Name: PutQuotes
    • Method Type: ANY
    • Integration Type: Lambda Function
    • Lambda Proxy Integration: Disabled
    • Lambda Function: PutQuotes

    Resource: GetQuotes

    • Resource Name: GetQuotes
    • Method Type: ANY
    • Integration Type: Lambda Function
    • Lambda Proxy Integration: Enabled
    • Lambda Function: GetQuotes
  4. Challenge

    Create Lambda Function Roles

    This should be created while you create the Lambda functions.

    1. PutQuoutes Role Name: PutQuotesRole
    2. GetQuotes Role Name: GetQuotesRole

    Each Role needs the ability to write to Amazon CloudWatch Logs, and it needs to be able to read and write to your Amazon DynamoDB Quotes table.

  5. Challenge

    Deploy, Log, and Test
    • Deploy the Quotes REST API to a new stage.
    • Under API Gateway Settings, set up a CloudWatch log role using the ARN from the IAM role that was created for you called OurApiGatewayToCloudWatchLogsRole
    • Under Logs and tracing settings of the Quotes REST API, set CloudWatch logs to Full requests and response logs and Enable X-Ray tracing.
    • Navigate to the invoke URL provided and append /PutQuotes to the end and hit Enter.
    • You will receive a message saying Item successfully written to DynamoDB if working correctly.
    • Refresh the page several times and verify that the function is working as intended by exploring the DynamoDB table items.
    • Replace the /PutQuotes resource with /GetQuotes in the Invoke URL.
    • You should receive a simple message with a quote! Refresh to randomly select quotes from the database.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

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.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight