Deploy Lambda function

In this step, we will create Lambda functions to read, write, and delete data in DynamoDB. Then grant the necessary permissions to those functions.

Backend Overview

AWS Lambda acts as the serverless compute layer (backend logic) for our Book Store application. Using Lambda allows us to run code without provisioning or managing any servers.

In this step, you will deploy 3 distinct Lambda functions to handle different tasks:

  1. Write Data Function: Receives book information (name, author, price, cover image, etc.) and writes a new item record to the database (DynamoDB).
  2. List Data Function: Scans the DynamoDB table and returns a full list of products (books) to be displayed on the front-end web application.
  3. Delete Data Function: Receives the ID of a specific book and executes a command to delete that record from DynamoDB.

These functions will later be configured to trigger via Amazon API Gateway (in the next module), acting as RESTful APIs that respond to user actions on the web. This step is a crucial building block to establish the entire backend for the system.