Log Forwarding
Log forwarding is the process of sending log data from your applications and services to a centralized location or a third-party log management provider. While CloudWatch is the primary log management service in AWS, many users choose to forward logs to third-party providers for advanced features like real-time analysis, machine learning insights, and customizable dashboards, or to meet specific compliance requirements.
Stacktape makes it easy to forward logs to the endpoint of your choice.
- Log forwarding is done using Amazon Kinesis Data Firehose delivery stream.
- When using log forwarding, you will incur costs based on the amount of data being transferred to the destination (~$0.03 per transferred GB). Refer to AWS Kinesis Firehose Pricing page to see details.
- Currently supported destinations for logs:
http-endpoint
- delivers logs to any HTTP endpoint.
- The endpoint must follow Firehose request and response specifications. (Many of the third party vendors are compliant with this specifications out of the box.)
datadog
- delivers logs to Datadog.
highlight
- delivers logs to Highlight.io project.
Refer to our docs for more information.
Logs that fail to be delivered to the destination even after multiple retries (time spend on retries can be configured) are put into bucket with name {stackName}-{resourceName}-logs-{generatedHash}
HTTP endpoint forwarding
You can forward logs to any HTTP endpoint that complies with the Firehose request and response specifications. Many third-party vendors are compliant with these specifications out of the box.
resources:myFunction:type: functionproperties:logging:logForwarding:type: http-endpointproperties:endpointUrl: https://my-endpoint.compackaging:type: stacktape-lambda-buildpackproperties:entryfilePath: lambdas/js-lambda.js
Datadog forwarding
Forwards logs to your Datadog account.
resources:myFunction:type: functionproperties:logging:logForwarding:type: datadogproperties:apiKey: your_datadog_api_keypackaging:type: stacktape-lambda-buildpackproperties:entryfilePath: lambdas/js-lambda.js
Highlight forwarding
Forwards logs to your Highlight project.
resources:myFunction:type: functionproperties:logging:logForwarding:type: highlightproperties:projectId: your_highlight_project_idpackaging:type: stacktape-lambda-buildpackproperties:entryfilePath: lambdas/js-lambda.js