CRUD operations using API Gateway, Lambda and DynamoDB

Creating Table in DynamoDB

This is an asynchronous operation. Upon receiving a create table request, DynamoDB immediately returns a response with a Table status of CREATING. After the table is created, DynamoDB sets the Table status to ACTIVE.

You can perform read and write operations only on an ACTIVE table.

AttributeDefinitions — An attributes which describe the key schema for the table. it is a required object.

KeySchema — Specifies the attributes that makes the primary key for a table. attributes in KeySchemamust be defined in AttributeDefinitions .

Writing to Table in DynamoDB

Note: Pass JSON Value for event in the test because we are integrating with API Gateway.

Reading from Table in DynamoDB

Note: Pass JSON Value for event in the test because we are integrating with API Gateway.

Also, here it is required that we mention both the Attributes in Item which are defined in KeySchema.

Deletion from Table in DynamoDB

Note: Pass JSON Value for event in the test because we are integrating with API Gateway.

Also, here it is required that we mention both the Attributes in Item which are defined in KeySchema.

Updating the Table in dynamodb

Note: Pass JSON Value for event in the test because we are integrating with API Gateway.

DynamoDB Table

API Gateway Creation

Step: 1

Step: 2 Give Your API Gateway name with endpoint type regional

Step: 3

Step:4

Step:5

Step:6

Step:7

Step:8

Step:9

Step:10

Step:11 -> Hit API Gateway URL with Post Method and pass the required values

Step: 12 Similarly you can create GET, PUT, DELETE,POST Method in postman.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store