Last Updated: Jul. 21, 2022
Coralogix provides an easy way to collect your Cloud watch metrics.
The preferred and easiest integration method will be to use our AWS Serverless Application Repository. Our code is open source and you can see it on Github Requirements
Your AWS user should have permissions to create lambdas and IAM roles. Installation – Lambda layer
Navigate to the Application Page. Based on your lambda write the runtime in ‘CompatibleRuntimes’ Based on your lambda architecture put ‘true’ in either ‘AMD64SupportEnabled’ or ‘ARM64SupportEnabled’ and ‘false’ in the other Click Deploy. Installation – Container image lambda
In case you deploy your lambda as container image, to inject extension as part of your function just copy it to your image:
FROM coralogixrepo/coralogix-lambda-extension:latest AS coralogix-extension
# Layer code
COPY --from=coralogix-extension /opt/ .
# Function code
COPY app.py .
Note: in this example, python3.8 is being used as the runtime but all runtimes are supported with our lambda extension.
Once the deployment is done the Layer is ready and you can add it to any Lambda you wish to collect logs from.
This is how:
Go to the Lambda functions from which you want to send logs to Coralogix, choose the ‘Layers’ component, and click ‘Add Layer’ Select Custom Layers, choose the coralogix-extension layer that matches your lambda architecture, select the latest version and click ‘Add’ Go to the environment variables section in your Lambda function and add the following ENV variables: CORALOGIX_PRIVATE_KEY – A unique ID that represents your company. CORALOGIX_APP_NAME – A mandatory metadata field that is sent with the logs. Helps identify the logs sent by this Lambda function. CORALOGIX_SUB_SYSTEM – A mandatory metadata field sent with the logs. Helps identify the logs sent by this Lambda function. CORALOGIX_LOG_URL (Optional) – use https://<cluster_url>/api/v1/logs Using the table below find the appropriate ‘ Cluster URL’ . Coralogix Endpoints <cluster_url>
Region Logs Endpoint EU
You’re all set! Data will begin streaming to Coralogix.
Need any help with your integration? ping us on our in-app chat or at [email protected]