Objective

The objective of this article is to deploy an AWS Lambda function and a DynamoDB table using Terraform, so that the Lambda function can perform read and write operations on the DynamoDB table. Here, we won’t use any other AWS services to trigger the Lambda function. Instead, we’ll trigger the Lambda function using the test events that is already present in the Lambda console.

AWS Lambda

AWS lambda lets the user to run code without provisioning or managing servers and the user needs to pay for how much they use. The user can also scale it up and down according to their needs.

Amazon DynamoDB

Amazon DynamoDB is a fully managed proprietary NoSQL database service that supports key-value and document data structures. It allows us to create database tables that can store and retrieve any amount of data. It also relieves the customers from the burden of operating and scaling a distributed database.

Please note that, DynamoDB does not require schema definition, and so there is no such thing called as a “column”. We can just add a new item with a new attribute.

Prerequisites -

  1. You should have an AWS account.
  2. You should have a basic knowledge of Node.js.
  3. You should have Terraform installed in your system.

So, now we are all set to dive into our project.

#dynamodb #nodejs #aws #aws-lambda #terraform

Deploy AWS Lambda and DynamoDB using Terraform
6.10 GEEK