Serverless Basket Service

Purpose & Background

In this lab, you will:

  • Set up a table in Amazon DynamoDB to store user shopping cart.
  • Configure an AWS Lambda function to interact with DynamoDB and handle shopping cart-related client requests.
  • Modify the Amazon API Gateway set up in previous lab to redirect cart-related client requests to the Lambda function.

Using a microservices architecture gives you freedom to choose different technologies for each service. This is known as a Polyglot Microservices architecture. It allows each team to choose the technologies that are best for their service. In this lab you will configure AWS Lambda and Amazon DynamoDB for the basket, or shopping cart, service.

Basket Service Architecture Diagram

Prerequisites

  • Environment Setup
  • Facade Configuration

AWS Services Used in This Lab

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. It’s a fully managed, multiregion, multimaster, durable database with built-in security, backup and restore, and in-memory caching for internet-scale applications. DynamoDB can handle more than 10 trillion requests per day and can support peaks of more than 20 million requests per second.