Docs
Install
AWS CloudWatch

AWS CloudWatch

This Guide Integrates:

✅ Logs✖️ Metrics✖️ Traces

Note: Cloud-only feature. The self-hosted open source version of HyperDX does not support this integration.

Setup HyperDX CloudWatch Integration

There are two options (automated vs manual) to create a AWS Lambda function that collects CloudWatch logs and sends them to HyperDX in bulk over HTTP.

Automated CloudFormation deployment

Start the automated deployment

To deploy this project, click the button that matches the region you wish to deploy your Stack to:

REGIONDEPLOYMENT
us-east-1Deploy to AWS (opens in a new tab)
us-east-2Deploy to AWS (opens in a new tab)
us-west-1Deploy to AWS (opens in a new tab)
us-west-2Deploy to AWS (opens in a new tab)
eu-central-1Deploy to AWS (opens in a new tab)
eu-north-1Deploy to AWS (opens in a new tab)
eu-west-1Deploy to AWS (opens in a new tab)
eu-west-2Deploy to AWS (opens in a new tab)
eu-west-3Deploy to AWS (opens in a new tab)
sa-east-1Deploy to AWS (opens in a new tab)
ca-central-1Deploy to AWS (opens in a new tab)
ap-northeast-1Deploy to AWS (opens in a new tab)
ap-northeast-2Deploy to AWS (opens in a new tab)
ap-northeast-3Deploy to AWS (opens in a new tab)
ap-south-1Deploy to AWS (opens in a new tab)
ap-southeast-1Deploy to AWS (opens in a new tab)
ap-southeast-2Deploy to AWS (opens in a new tab)

Specify stack details

Specify the stack details as per the table below, check the checkboxes and select Create stack.

ParameterDescription
hyperdxIngestionKey (Required)The Ingestion API Key (opens in a new tab) of the account you want to ship to.
logGroup*CloudWatch Log Group name from where you want to send logs.
hyperdxServiceNameThe service name used to identify your service in the HyperDX app, it can be any name you want.
hyperdxFormat (Default: text)json or text. If json, the Lambda function will attempt to parse the message field as JSON and populate the event data with the parsed fields.
hyperdxEnrichEnrich CloudWatch events with custom properties, formatted as key1=value1;key2=value2.
requestTimeout (Default: 15)Timeout in seconds for each http request for sending logs into HyperDX.

Manual configuration

Create a new Lambda function

  1. Open the AWS Lambda Console, and click Create function.
  2. Choose Author from scratch.
  3. In Name, add the log type to the name of the function.
  4. In Runtime, choose Python 3.9.
  5. Click Create Function.

After a few moments, you'll see configuration options for your Lambda function. You'll need this page later on, so keep it open.

Zip the source files

Clone the CloudWatch Logs Shipper - Lambda project from GitHub to your computer, and zip the Python files in the src/ folder as follows:

git clone https://github.com/hyperdxio/hyperdx-aws-serverless.git \
&& cd hyperdx-aws-serverless/python3/cloudwatch/ \
&& make build

Upload the zip file and set environment variables

  1. In the Code source section, select Upload from > .zip file.
  2. Click Upload, and choose the zip file you created earlier (dist/hyperdx-cloudwatch-log-shipper.zip ).
  3. Click Save.
  4. Navigate to Configuration > Environment variables.
  5. Click Edit.
  6. Click Add environment variable.
  7. Fill in the Key and Value fields for each variable as per the table below:
ParameterDescription
TOKEN (Required)The Ingestion API Key (opens in a new tab) of the account you want to ship to.
TYPEThe service name used to identify your service in the HyperDX app, it can be any name you want.
FORMAT (Default: text)json or text. If json, the Lambda function will attempt to parse the message field as JSON and populate the event data with the parsed fields.
ENRICHEnrich CloudWatch events with custom properties, formatted as key1=value1;key2=value2.
REQUEST_TIMEOUT (Default: 15)Timeout in seconds for each http request for sending logs into HyperDX.

Set the CloudWatch Logs event trigger

  1. Find the Add triggers list (left side of the Designer panel) and choose CloudWatch Logs from this list.
  2. In the Log group field, select the applicable log group.
  3. Type a Filter name (required) and Filter pattern (optional).
  4. Click Add, and then click Save at the top of the page.

Automatically Stream All Log Groups (Optional)

Once the HyperDX Lambda function is installed, you can enable the AWS integration (opens in a new tab) to automatically stream all CloudWatch log groups within a given region. The integration will periodically scan for new log groups and update the forwarder Lambda to listen to the new log group.

Hi, how can I help you?