• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Consul
  • Install
  • Tutorials
  • Documentation
  • API
  • CLI
  • Try Cloud(opens in new tab)
  • Sign up
Consul Home

Documentation

Skip to main content
  • Documentation
  • What is Consul?



    • Overview
    • Invoke Lambda Functions from Services
    • Invoke Services from Lambda Functions
      BETABETA

  • HCP Consul


  • Resources

  • Tutorial Library
  • Certifications
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Consul
  3. Documentation
  4. AWS Lambda
  • Consul
  • v1.13.x
  • v1.12.x
  • v1.11.x
  • v1.10.x
  • v1.9.x
  • v1.8.x

ยปConsul and AWS Lambda Overview

You can configure Consul to allow services in your mesh to invoke Lambda functions, as well as allow Lambda functions to invoke services in your mesh. Lambda functions are programs or scripts that run in AWS Lambda. Refer to the AWS Lambda website for additional information.

Register Lambda functions into Consul

The first step is to register your Lambda functions into Consul. We recommend using the Lambda registrator module to automatically synchronize Lambda functions into Consul. You can also manually register Lambda functions into Consul if you are unable to use the Lambda registrator.

Refer to Lambda Function Registration Requirements for additional information about registering Lambda functions into Consul.

Invoke Lambda functions from Consul service mesh

After registering AWS Lambda functions, you can invoke Lambda functions from the Consul service mesh through terminating gateways (recommended) or directly from connected proxies.

Refer to Invoke Lambda Functions from Services for details.

Invoke mesh services from Lambda function

Lambda-to-mesh functionality is currently in beta: Functionality associated with beta features are subject to change. You should never use the beta release in secure environments or production scenarios. Features in beta may have performance issues, scaling issues, and limited support.

You can also add the consul-lambda-extension plugin as a layer in your Lambda functions, which enables them to send requests to services in the mesh. The plugin starts a lightweight sidecar proxy that directs requests from Lambda functions to mesh gateways. The gateways route traffic to the destination service to complete the request.

Invoke mesh service from Lambda function

Refer to Invoke Services from Lambda Functions for additional information about registering Lambda functions into Consul.

Consul mesh gateways are required to send requests from Lambda functions to mesh services. Refer to Mesh Gateways for additional information.

Note that L7 traffic management features are not supported. As a result, requests from Lambda functions ignore service routes and splitters.

Edit this page on GitHub

On this page

  1. Consul and AWS Lambda Overview
  2. Register Lambda functions into Consul
  3. Invoke Lambda functions from Consul service mesh
  4. Invoke mesh services from Lambda function
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)