Skip to content

configcat-labs/feature-flags-aws-lambda-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use feature flags with AWS Lambda

This is a companion repo for the blog article titled: How to use feature flags with AWS Lambda. The article walks you through the steps on how you can use ConfigCat feature flags to control functionalities of your AWS Lambda functions.

Prerequisites

Preparing the app

  1. Clone this repo and run npm install to install the packages.

  2. Open the index.mjs and replace YOUR-CONFIGCAT-SDK-KEY with your SDK Key. If you named your feature flag differently you may need to change its name in the getValueAsync function.

Uploading and the code to AWS

  1. In the root folder, run the following command to zip all the files:
zip function.zip *
  1. On the function page, with the Code tab selected, upload your function.zip file by clicking the Upload from button on the right.

Creating an API Gateway trigger

Add an API Gateway trigger. As a result, when a GET request is sent to the function endpoint it will trigger the execution of the function.

Deploy the code

Click the Deploy button to publish the function, then make a GET request to the endpoint url generated by the API Gateway trigger.

Learn more

Useful links to technical resources.

ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here.

You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.

Keep up with ConfigCat on Twitter, Facebook, LinkedIn, and GitHub.

Author

Chavez Harris

Contributions

Contributions are welcome!

About

A companion repo for How to use feature flags with AWS Lambda

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published