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.

Uses Kinesis Data Firehose (~$0.03/GB). Failed deliveries go to a backup S3 bucket.

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: function
    properties:
      logging:
        logForwarding:
          type: http-endpoint
          properties:
            endpointUrl: https://my-endpoint.com
      packaging:
        type: stacktape-lambda-buildpack
        properties:
          entryfilePath: lambdas/js-lambda.js
HttpEndpointLogForwardingAPI reference
typeRequired
No description

Type: string "http-endpoint"

properties.endpointUrlRequired

HTTPS endpoint URL where logs are sent.

Type: string

properties.gzipEncodingEnabled

Compress request body with GZIP to reduce transfer costs.

Type: boolean

properties.parameters

Extra metadata sent in the X-Amz-Firehose-Common-Attributes header.

Type: Object

properties.retryDurationDefault: 300

Total retry time (seconds) before sending failed logs to a backup S3 bucket.

Type: number

properties.accessKey

Auth credential sent in X-Amz-Firehose-Access-Key header. Store as $Secret() for security.

Type: string

Datadog forwarding

Forwards logs to your Datadog account.

resources:
  myFunction:
    type: function
    properties:
      logging:
        logForwarding:
          type: datadog
          properties:
            apiKey: your_datadog_api_key
      packaging:
        type: stacktape-lambda-buildpack
        properties:
          entryfilePath: lambdas/js-lambda.js
DatadogLogForwardingAPI reference
typeRequired
No description

Type: string "datadog"

properties.apiKeyRequired

Your Datadog API key. Store as $Secret() for security.

Type: string

properties.endpointUrlDefault: https://aws-kinesis-http-intake.logs.datadoghq.com/v1/input

Datadog endpoint. Use the EU URL if your account is in the EU region.

Type: string

Highlight forwarding

Forwards logs to your Highlight project.

resources:
  myFunction:
    type: function
    properties:
      logging:
        logForwarding:
          type: highlight
          properties:
            projectId: your_highlight_project_id
      packaging:
        type: stacktape-lambda-buildpack
        properties:
          entryfilePath: lambdas/js-lambda.js
HighlightLogForwardingAPI reference
typeRequired
No description

Type: string "highlight"

properties.projectIdRequired

Your Highlight.io project ID (from the Highlight console).

Type: string

properties.endpointUrlDefault: https://pub.highlight.io/v1/logs/firehose

Highlight.io endpoint. Override for self-hosted or regional endpoints.

Type: string