1. Create static S3 website with public endpoint
Go to S3, and create a bucket.
Enable Static Website hosting, and create a simple index.html file. This file will call API Gateway to retrieve DynamoDB entries.
2. Create NoSQL database with DynamoDB
Create a DynamoDB table with 1 Read and 1 Write Capacity Unit (for cost efficiency).
Set id as primary key for this demo.
Create a test item.
3. Create PutItem API and Lambda
Below is the handler code. It calls DynamoDB.put with a callback.
4. Create GetTableView API and Lambda
Below is the handler code. It calls DynamoDB Scan with a callback.
2. Create an API Gateway Endpoint for POST and GET
Create a REST API. Create a POST and a GET endpoint, with a GET by Partition Key option.