Deploying Failure Flags on AWS Lambda
Supported platforms:
This document will walk you through setting up Failure Flags for AWS Lambda Functions. On Lambda, Failure Flags is deployed as a Lambda Extension called Gremlin-Lambda. This extension creates a sidecar container that runs alongside your function. Gremlin-Lambda supports both AMD64/x86_64 and ARM64 architectures. You can learn more about the AWS Lambda Extensions API in the AWS documentation.
Configuring Failure Flags for AWS Lambda
The Gremlin-Lambda Extension accepts the following environment variables in addition to those defined in Configuring Failure Flags. When referencing files, the filename must be a fully qualified path from the root of the resulting Lambda Function file system (typically /var/task):
Adding the Gremlin-Lambda Extension to your Lambda Function
Gremlin releases a new version of the Failure Flags Lambda layer with each sidecar release. This means the Lambda layer version (indicated by the number at the end of the ARN) will change with each release. We’ll include the corresponding Lambda layer number for each sidecar release in the Failure Flags sidecar release notes.
The Extension's Amazon Resource Name (ARN) varies depending on where your Lambda Function is deployed and which architecture you're using. Retrieve the correct ARN for your architecture and AWS region from this table:
Once you have the correct ARN, add the extension to your Lambda Function by following the instructions in the AWS Lambda Developer Guide.
Building your own Lambda Layer
You may want to build your own Lambda Layer or incorporate the gremlin-lambda binary in a Lambda container image. Maybe you're at risk of using too many layers, or maybe your organization has a package caching policy. Either way you'll want to build your own asset. You can access all of the gremlin-lambda and failure-flags-sidecar builds via our website.
Files provided via assets.gremlin.com have the following format: https://assets.gremlin.com/packages/gremlin-lambda/{VERSION}/{ARCH}/{FILE}
You can reference the LATEST release at: https://assets.gremlin.com/packages/gremlin-lambda/latest/{ARCH}/{FILE}
ARCH is one of the following:
- x86_64
- arm64
Different releases may include different files, but the current FILE set includes:
- gremlin-lambda-linux.tar.gz
- layer-gremlin-lambda.zip
- LICENSE
You can find a list of releases in our release notes, or in our VERSIONS file.
Troubleshooting Failure Flags
This Lambda Extension provides debug logging when the GREMLIN_DEBUG environment variable is set to true . This information will be included with your Lambda logs and prefixed with [gremlin-lambda]. This additional information will include configuration details, registration status, connection tracing, any relevant errors encountered while interacting with the control plane, and requests for experiments from the Failure Flags SDKs.

