APIGW + Lambda + DynamoDB
In this post, let see a demo application which is accessible by the users via API GW and the back end logic for the application is served by AWS lambda function. For persistent storage, we are using DynamoDB table. Lets start with DynamoDB table: I created a DynamoDB table by the name " employee_table ". Table has a primary key " employee_id " of datatype Number. So, any query to the table must be made through the key " employee_id ", else we need to scan the entire table. Let's add an item to the table from console. Now, we added an item to the table. Let's do the same and other action via API GW and Lambda Functions. Let's create a lambda function. One lambda function, based on the query parameter it invokes the function within the lambda. import json import boto 3 from botocore.exceptions import ClientError from decimal import Decimal from boto 3 .dynamodb.conditions import Key # Initialize the DynamoDB client dynamodb = boto 3 .resource(...