January 16th, 2018

Serverless computing with AWS Lambda, Part 2: AWS Lambda with DynamoDB

Development Tools, Enterprise Architecture, Java App Dev, Java Web Development, others, Programing, by admin.

The first half of this article presented an overview of serverless computing with AWS Lambda, including building, deploying, and testing AWS Lambda functions in an example Java application. In Part 2, you’ll learn how to integrate Lambda functions with an external database, in this case DynamoDB. We’ll then use the AWS SDK to invoke Lambda functions from our example Java application.

AWS Lambda and DynamoDB

DynamoDB is a NoSQL document store that is hosted by Amazon Web Services (AWS). DynamoDB defines data abstractions as tables, which accept common database operations such as insert, retrieve, query, update, and delete. As with many other NoSQL databases, DynamoDB’s schema isn’t fixed, so some items in the same table can have fields that others do not.

One of DynamoDB’s best features is its tiered pricing model. Unlike the AWS Relational Database Service (RDS), in which AWS manages your database using EC2 instances that you pay for, DynamoDB is pay-as-you-go. You pay for the storage you use and the throughput of your queries, but you don’t directly pay for any underlying virtual machines. Additionally, AWS gives you a free tier supporting up to 25 GB of space, with enough throughput to execute up to 200 million requests per month.

In Serverless computing with AWS Lambda, Part 1, we developed a simple, serverless Java application using Lambda functions. You can download the source code for the GetWidgetHandler application anytime. If you haven’t already read Part 1, I suggest familiarizing yourself with the application code and examples from that article before proceeding.

Back Top

Leave a Reply