Creating Serverless Backend using AWS Lambda and DynamoDB

In this post I’m going to show how to create Lambda function for creating and showing items on DynamoDB.

Our diagram looks like this basically.

First of all we need to create our dynamodb table. I created using java sdk with these codes. This codes can be found in aws documentation.
Changed provisioned resources to 1 because yeah we just trying these no need much space.

Since DynamoDB is nosql database i also created a model for future items. Table is simple we have person name,surname and addresses

Add item function :

Lets invoke this function on lambda console
Yes i know you cant find james holden on Earth, maybe we should write Rocinante :).

Show item function:

Lets deploy and test this show method.
Created new stage as prod on apigateway and publish my methods there. Apigateway gave me a link for execute methods.


Creating serverless backend easily with lambda is so much fun and so fast. You dont even think about servers/security(infra).

This entry was posted in AWS and tagged , , , , , , . Bookmark the permalink.

Leave a Reply