- Create a Lambda function in AWS.
- Write a simple function that returns a list of users:
[
{name: "Peter", id: "01"},
{name: "Michael", id: "02"},
{name: "Ann", id: "03"},
{name: "Williams" id: "04"}
]
- Test the function inside AWS Lambda Console.
- Create an API Gateway as REST API.
- Create a GET method that triggers the Lambda function.
- Deploy the API and obtain the API endpoint.
- Test using Postman or Curl.
- Create a DynamoDB table named users with:
- Primary Key: userId (String).
- Modify the Lambda function to write data from DynamoDB.
- Accept input JSON and store data in DynamoDB.
- Query data from the database.
- Modify the Lambda function to retrieve a user by userId.
- Accept userId as a path parameter.
- Create and deploy AWS Lambda functions.
- Expose APIs using API Gateway.
- Store and retrieve data from DynamoDB.