AWS Lambda Extensions lets you integrate Lambda with your favorite tools for monitoring, observability, security, and governance. Extensions enable you and your preferred tooling vendors to plug into Lambda’s lifecycle and integrate more deeply into the Lambda execution environment.
This repository contains SumoLogic AWS Lambda extension.
The Sumo Logic lambda extension is available as an AWS public Layer. The latest layer is:
For x86_64 use:
arn:aws:lambda:<AWS_REGION>:956882708938:layer:sumologic-extension-amd64:<latest version from github release>
For arm64 use:
arn:aws:lambda:<AWS_REGION>:956882708938:layer:sumologic-extension-arm64:<latest version from github release>
- AWS_REGION - Replace with your AWS Lambda Region.
All the logs that are not sent to Sumo Logic during the Execution phase of the AWS Lambda, are sent during the shutdown phase instead. For more details on phases on the lifecycle and AWS Lambda phases please see the AWS documentation .
If you would like to always send logs during the execution phase however, you can add extra execution time via a sleep function at the end of lambda code, which will give your extension time to run and send logs to Sumo Logic. We recommend setting this to two seconds.
Follow the instruction in docs
Refer containerimageexample folder To see sample Dockerfile for python arm64 image.
- To improve the existing app or reporting issues, follow instructions in CONTRIBUTING
-
You can also join our slack community at sumodojo.slack.com.
-
Here's the CODE_OF_CONDUCT guidelines to follow.
- To know more about how to use this extension follow docs here.
- AWS Lambda Extensions API
For Full Change Log, please visit Releases page.
env GOOS=darwin go build -o "sumologic-extension" "lambda-extensions/sumologic-extension.go"
This script assumes you have aws cli already configured.
- Go to scripts folder
- Export Profile export AWS_PROFILE=
- Change the layer_name variable in zip.sh to avoid replacing the prod.
- Run below command
sh zip.sh
Releasing new layer versions
-
Go to scripts folder
-
Export Profile export AWS_PROFILE=. The profile should point to sumocontnet aws account.
-
Run below command
sh zip.sh
-
The new extension binary and zip files gets released automatically after the tags are pushed using Github actions(Refer tagged-release in https://github.com/marvinpinto/action-automatic-releases).
Run below commands to create and push tags
git tag -a v<major.minor.patch> <commit_id>
git push origin v<major.minor.patch>
-
Add the sumologic-extension-amd64.tar.gz and sumologic-extension-arm64.tar.gz files manually from the target folder generated after running zip.sh.
-
Update the release description with new layer arns and more details on what's changed.
1> Unit Testing locally
- Go to root folder and run "go test ./..."
- Go to lambda-extensions folder and run "go test ./..."
2> Testing with Lambda function
Add the layer arn generated from build command output to your lambda function by following instructions in docs.