Skip to content

aws-samples/amazon-api-gateway-websocket-feature-toggles

Feature toggle management using API Gateway WebSocket APIs

This repository contains a SAM application that uses Amazon API Gateway WebSocket APIs, AWS Lambda functions, and AWS DynamoDB streams to build a feature toggle management solution. This solution allows you to store feature toggles in DynamoDB and automatically push notifications to connected clients when feature toggle states are changed.

For more information, refer to the blog post for this solution.

Deploy

You can deploy this solution using the SAM template included in this repository.

First, ensure you have the SAM CLI installed. Then, you can deploy the SAM template using the following command from the application root. This command will take you through a guided SAM deployment.

sam deploy --guided

Test

To test this solution, you will need to insert some sample feature toggles into the "FeatureToggleTable" DynamoDB table. Refer to the blog post for more details.

After you have test data in DynamoDB, you can use wscat to test the connection to your API Gateway endpoint. Once you connect to your API Gateway endpoint, the current state of feature toggles should be automatically pushed to you.

$ wscat -c wss://{YOUR-API-ID}.execute-api.{YOUR-REGION}.amazonaws.com/{STAGE}
> { ... feature toggle info ... } 

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

SAM application containing a feature toggle management solution based on Amazon API Gateway WebSocket APIs, AWS Lambda functions, and AWS DynamoDB streams.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages