Amazon API Gateway WebSocket API connection ID tracking

API Gateway WebSocket API → Amazon DynamoDB

Track API Gateway WebSocket API connections using AWS Service integration with DynamoDB

This pattern uses Amazon API Gateway WebSocket API and AWS Service integration type with AmazonDynamoDB for client connection tracking.
This approach simplifies architecture by eliminating need to use additional compute components such as AWS Lambda.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-websocket-api-connection-dynamodb

Deploy

sam deploy --guided


Testing

See the 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:

Giedrius Praspaliauskas

Giedrius Praspaliauskas

Giedrius is a senior solutions architect focusing on serverless at Amazon Web Services based in the US.

Follow on LinkedIn