Skip to content

Showcases Consul's serverless integration with AWS Lambda

License

Notifications You must be signed in to change notification settings

cthain/consul-lambda-demo

Repository files navigation

Consul Lambda Demo

This project showcases Consul's AWS multi-runtime support with AWS EKS and Lambda.

Below is a list of resources for taking the next steps to integrating your AWS Lambda functions with your Consul service mesh:

Architecture

This demo deploys the HashiCups demo application on Amazon Elastic Kubernetes Service (EKS) and connects all the components using Consul service mesh. The Consul server is deployed and managed using the HashiCorp Cloud Platform (HCP). AWS Lambda functions are deployed during the demo and configured as part of the Consul service mesh.

The architecture of the system at the end of the demo is presented in the figure below.

Consul Lambda demo architecture

Requirements

This project requires the following:

Usage

Note: Running the steps in this demo will create resources that are not eligible for the AWS free-tier and will generate costs to your AWS account.

Deploy the demo infrastructure

Deploy the AWS infrastructure and the HashiCups demo application using Terraform.

terraform init && terraform apply -auto-approve

Run the demo

The runbook script automates all the steps to deploy the AWS Lambda functions into the Consul service mesh. It walks you through the demo and provides prompts for each step of the way.

./runbook

If you're interested in how the demo works take a look at the runbook. It's just a bash script.

Reset the demo

If you want to run the demo over again, you can use the runbook reset command. This command resets the demo to its original state. It removes the AWS Lambda components from the service mesh and clears the database.

The runbook reset command is idempotent and can be run repeatedly any number of times.

./runbook reset

Clean up all resources

When you're done, make sure that you clean up all your resources.

./runbook reset -f
terraform destroy -auto-approve

About

Showcases Consul's serverless integration with AWS Lambda

Resources

License

Stars

Watchers

Forks

Packages

No packages published