This demo shows how to use LaunchDarkly in a serverless environment. The resources include 2 Lambda functions, 1 DynamoDB table, an S3 static website, and the API Gateway. When the flag is off, the function increments a letter. When it's on, the function increments a number. The flag is created in the project you specify, and it's titled "Increment Number".
Once configured, you can stand this demo up in about 30 seconds.
This demo is not likely to blow your socks off, but it's the technology we're showcasing along with the art of the possible.
- Terraform is required. Make sure it's installed and accessible in your environment's path.
- AWS Credentials - AWS Console --> IAM --> Users --> Add User. Enter username (i.e. YOURNAME-api) and select programmatic access. This user will need administrator access.
- Once you have your access key and secret key, add them to your environment:
export AWS_ACCESS_KEY_ID="YOUR_ACCESS_KEY"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY"
- Clone this repo into your local environment.
- Rename the
terraform.tfvars.examplefile toterraform.tfvars. - Edit the
terraform.tfvarsfile and enter your own information for each variable. Variable descriptions are in thevariables.tffile. - Run the command
terraform initto download all providers. - Run the command
terraform apply --auto-approve. - When terraform finished, you'll be given a URL to your website. Plug it into your browser and start using the demo!
When you're finished, PLEASE tear it down. It's very, very easy. Just run the command terraform destroy --auto-approve
That's it! Everything is already wired up for you.
