AWS Lambda function URL to Amazon DynamoDB

AWS Lambda → Amazon DynamoDB

Create Lambda function with a function URL that inserts an item into the Amazon DynamoDB table.

The Lambda function URL exposes an HTTP(s) endpoint. When an HTTP POST request with the right payload is sent to this endpoint the Lambda function is invoked and inserts an item into the Amazon DynamoDB table (named users).

< Back to all patterns

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/lambda-functionurl-dynamodb-sam-go

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Abhishek Gupta

Abhishek Gupta

Principal Developer Advocate @ AWS

Follow on LinkedIn