AWS CloudWatch Logs

How to start logging with AWS CloudWatch through LogDNA.

The LogDNA AWS CloudWatch integration relies on AWS Lambda to route your CloudWatch logs to LogDNA.

Configure the LogDNA AWS Lambda function

  1. Create a new Lambda function and skip to the Configure function section
  2. Set the following fields:
    • Name: LogDNA
    • Runtime: Python 2.7
    • Code entry type: Upload a .ZIP file
    • Upload a .ZIP file
    • Handler: logdna_cloudwatch.lambda_handler
    • Environment variables:
      (Required) LOGDNA_KEY: LOGDNA_KEY YOUR_INGESTION_KEY_HERE
      (Optional) LOGDNA_HOSTNAME: Alternative Host Name
      (Optional) LOGDNA_TAGS: Comma-separated Tags
  3. Assign an IAM user with basic execution permissions
  4. Click Create function

Configure your AWS CloudWatch Stream

  1. Select the CloudWatch Log Group to upload to LogDNA
  2. Click the Actions menu and select Stream to AWS Lambda
  3. Select the LogDNA Lambda function and click Next
  4. Select the desired log format and click Start Streaming