The new docs.trellix.com features a modernized UI and AI-powered conversational search. Content is currently available in English, with additional languages expected in November 2026. We hope you enjoy the updated experience.

Integrate Trellix NDR with Amazon Route 53

Prev Next

The Trellix NDR Console (NDRC) provides a unified capability to configure and ingest DNS events from Amazon Route 53, enabling the solution to parse and correlate metadata for the detection of malicious activities.

This integration supports the seamless operation of existing detection engines within NDRC that includes DGA (Domain Generation Algorithm) Detection, DNS tunneling, Fast Flux, and rogue DNS, to generate high-fidelity alerts based on identified attack patterns. Designed for operational efficiency, this integration ensures that high-volume DNS events are transformed into actionable security intelligence.

How the integration works

  1. Log generation and S3 delivery

    • Amazon Route 53 Resolver logging captures internal DNS queries and answers generated within the Virtual Public Cloud (VPC).

    • These logs are delivered as compressed files to dedicated Amazon S3 buckets.

  2. Automated event triggering

    • When a new Route 53 DNS log file arrives in S3, an S3 event notification is sent to a central Amazon SQS queue.

    • The SQS message invokes the Worker Lambda, which identifies the source as Route 53 based on the S3 object key prefix (for example, /dnsquery/).

  3. Parsing and normalization

    • The ingestion Lambda parses each Route 53 record and categorizes it as either a DNS query event (dns.type: query) or a DNS answer event (dns.type: answer) based on the data received.

    • The DNS metadata is then transformed into a standardized JSON format.

    • For accurate load balancing across multiple events, events are hashed by Source IP to ensure consistent load balancing to the NDRC appliance.

  4. NDRC ingestion and detection

    • The Lambda sends gzipped batches of normalized Route 53 events to the NDR Console using a KMS-encrypted authentication token.

    • The NDR Console authenticates the client and forwards the events to the detection engines, which analyze the DNS traffic in real time to identify critical attack patterns.

  5. Alerting and triage

    • When any malicious pattern is detected by the detection engines, the NDR Console generates events and alerts in the UI. Analysts can investigate these events with contextual details, such as risk scores, victim information, and MITRE ATT&CK mappings.

Prerequisites

  • Ensure that you have access to the AWS Management Console with administrative privileges.

  • Identify the target VPCs for DNS query logging.

  • Ensure your IAM user/role has permissions to:

    • Access to Route 53 Resolver and create/manage query logging configurations.

    • Create and manage S3 buckets and apply bucket policies.

    • Associate query logging configurations with VPCs.

  • You have deployed an NDR Console instance in the AWS environment and have access to client_group_token for authentication. Refer to AWS (Amazon Web Services) deployment section in the NDR 4.x Deployment Guide for more information.

  • Make sure you have a valid NDR Core or NDR Enterprise license. See License Management section in the Trellix NDR 4.x Product Guide for NDR license activation and verification.

Prepare Amazon S3 for log storage

Logs must be delivered to a regional S3 bucket before the NDRC can ingest them. You can create a new bucket or reuse an existing one by defining a unique prefix.

Create an S3 bucket

  1. On the AWS Management Console, search for S3 and go to the S3 dashboard.

  2. Click Create bucket.

  3. Enter a unique Bucket name, such as ndrc-route53-logs-target.

  4. Select the same AWS region where your VPCs are located to minimize data transfer costs.

  5. Enable ACLs and set Object ownership to Bucket owner preferred.

  6. Select Block Public Access (recommended for security) and enable Server-side encryption (SSE-S3) to protect data at rest.

  7. Keep other settings as default or configure as per your organization's policy.

  8. Once configured, click Create Bucket.

Add a bucket policy for Route 53 resolver access

To allow Amazon Route 53 to deliver logs to your bucket, you must authorize their service via a custom bucket policy.

  1. In your newly created S3 bucket, select the Permissions tab.

  2. Under Bucket policy, click Edit.

  3. Paste the following policy. Remember to replace BUCKET_NAME with your actual S3 bucket name and ACCOUNT_ID with your AWS account ID.

  4. Click Save changes.

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "Route53ResolverQueryLoggingPutObject",
          "Effect": "Allow",
          "Principal": {
            "Service": "route53resolver.amazonaws.com"
          },
          "Action": "s3:PutObject",
          "Resource": "arn:aws:s3:::BUCKET_NAME/AWSLogs/ACCOUNT_ID/*"
        },
        {
          "Sid": "Route53ResolverQueryLoggingGetBucketAcl",
          "Effect": "Allow",
          "Principal": {
            "Service": "route53resolver.amazonaws.com"
          },
          "Action": "s3:GetBucketAcl",
          "Resource": "arn:aws:s3:::BUCKET_NAME"
        }
      ]
    }
    

Note

Reusing a bucket for multiple sources is supported as long as they use unique directory prefixes to avoid log overlap.

Configure Route 53 resolver query logging

  1. Ensure you are in the correct region (the same region as your VPCs and S3 bucket).

  2. Under the Resolver menu, select Query logging.

  3. Click Configure query logging.

  4. Enter a descriptive Name (for example, my-vpc-dns-logs).

  5. For Query log destination, select S3 bucket and browse to the bucket created.

  6. Click Add VPC and select the VPCs you wish to monitor for DNS logging. You can add multiple VPCs as per your requirement.

  7. Click Configure query logging.

    Logs will now begin flowing to S3 in .gz format.

Important

The Lambda identifies logs using the /dnsquery/ prefix by default. Ensure your configuration matches the S3 object key prefix. To set the prefix:

  1. Under the Resolver menu, click Query logging and click Configure query logging.

  2. Select the required S3 bucket. If you wish to use a sub-folder, specify the prefix (for example, route53/ or dnsquery/) here.

Set up the event-driven SQS pipeline

The Trellix NDRC uses an SQS queue to buffer incoming events and trigger the ingestion Lambda.

Create Dead-Letter Queue (DLQ)

  1. Search SQS in the AWS console and select Amazon SQS.

  2. In the left navigation pane, choose Queues.

  3. Click Create queue.

  4. Enter a descriptive Name, such as ndr-dns-query-logs-dlq.

  5. Leave default settings for other options.

  6. Click Create queue.

  7. Record the Queue ARN from the details page.

Create main SQS queue

  1. Back in the Amazon SQS console, click Create queue.

  2. Enter a descriptive Name, such as ndrc-dns-ingestion-queue

  3. Configure the Redrive Policy to use the DLQ and set Maximum receives to 3 or 5.

  4. Click Create queue.

  5. Record its Queue URL and Queue ARN from the details page.

Configure S3 event notifications

  1. In the S3 console, navigate to the bucket where your DNS query logs are stored.

  2. Go to the Properties tab and locate the Event notifications section.

  3. Click Create event notification.

  4. Enter a descriptive Event name, such as SendDNSLogsToSQS

  5. Enter the Prefix of your specific Route 53 path for your DNS logs.

  6. Use the .gz extension as Suffix.

  7. Select All object create events as Event types.

  8. Select SQS Queue and select the ARN of the ndr-dns-query-logs queue.

  9. Save the changes.

Integrate Lambda function for SQS and NDR Console

Create IAM policy for custom metrics

  1. Login as admin with permissions for IAM management.

  2. Go to the IAM Dashboard. In the left navigation pane, click Policies.

  3. Click Create policy and select the JSON tab.

  4. Paste the following JSON policy. This grants the specific cloudwatch:PutMetricData permission.

    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Action": [
    "cloudwatch:PutMetricData"
    ],
    "Resource": "*"
    }
    ]
    }
    
  5. Click Next: Tags (optional), then Next: Review.

  6. Enter a descriptive Policy name, such as ndrc-cloudwatch-put-metrics-policy

  7. Click Create policy.

Create IAM role for Lambda execution

  1. In the IAM Dashboard, click Roles in the left navigation pane.

  2. Click Create role.

  3. Select AWS service as Trusted entity type

  4. Select Lambda and click Next.

  5. On the Permissions page, search and attach the following five policies:

    1. AWSLambdaBasicExecutionRole

    2. AmazonSQSFullAccess

    3. AmazonS3ReadOnlyAccess

    4. AWSLambdaVPCAccessExecutionRole

    5. ndrc-cloudwatch-put-metrics-policy

  6. Click Next.

  7. Enter a descriptive IAM role name, such as ndrc-lambda-execution-role

  8. Review the role details and attached policy details, and then click Create role.

  9. Record the Role ARN.

Create Security group for Lambda

  1. Go to EC2 Dashboard. In the left navigation pane, click Security Groups.

  2. Click Create security group.

  3. Enter a descriptive Security group name, such as ndrc-lambda-sg.

  4. Select the required VPC.

  5. Inbound rules: Select No inbound rule.

  6. Outbound rules: No additional configuration needed.

    1. Click Add rule again.

    2. Select Type as All traffic.

    3. Select Destination as 0.0.0.0/0

      This rule is still needed to allow Lambda to reach AWS services like S3, CloudWatch, and SQS endpoints outside your VPC via the NAT Gateway, and for any other internet access.

  7. Click Create security group.

  8. Record the Lambda Security Group ID.

Create Lambda function

  1. After the function is created, you are redirected to its overview page.

  2. On Code tab:

    1. Under the Code source section, click Upload from .zip file.

    2. Click Upload and select your ndrc_lambda.zip file (the deployment package).

    3. Once uploaded, scroll down to Runtime settings. Click Edit.

    4. Ensure this is lambda_function.lambda_handler (assuming your main Python file is lambda_function.py and your handler function is lambda_handler).

      Click Save.

  3. On Configuration tab:

    1. General configuration

      1. Click Edit

      2. Set Memory to 512 MB (You can tune the memory based on file size)

      3. Set Timeout to 5 minutes (300 seconds).

      4. Click Save.

    2. Ephemeral storage (in /tmp)

      1. Click Edit.

      2. Set Ephemeral storage to 512 MB (default)

      3. Click Save.

    3. Configure environment variables

      1. Go to the Configuration tab and select Environment variables from the left menu.

      2. Click Edit.

      3. Click Add environment variable.

      4. Select Key as NDRC_CONFIG_JSON

      5. For Value, Paste the entire JSON configuration from the sample below. Remember to replace placeholders like YOUR_NDRC_IP_ADDRESS, YOUR_NDRC_CLIENT_GROUP_TOKEN with correct details.

      6. Click Save.

      {
        "log_level":"DEBUG",
        "appliances":[
           {
              "ip":"YOUR_NDRC_IP_ADDRESS",
              "client_group_token":"YOUR_NDRC_CLIENT_GROUP_TOKEN"
           }
        ],
        "route53_log_config":{
           "log_prefix_key":"dnsquery",
           "enable_dns_logging":false,
           "hosts_to_trace":[
              "10.x.x.x"
           ]
        }
      
    4. VPC

      1. Click Edit.

      2. Select the required VPC and subnets

      3. Select the required security group.

      4. Click Save.

    5. Concurrency

      1. Go to Concurrency and recursion detection → Concurrency, and click Edit.

      2. Select Reserved concurrency and set it to 1

      3. Click Save.

    Important

    • The NDRC_CONFIG_JSON file can be used for troubleshooting purposes.

    • If you are working with multiple NDR appliances, you need to add the ip and client_group_token for each appliance in the NDRC_CONFIG_JSON file.

    • VPC changes can take a few moments to apply. Do not proceed until the status message confirms it's updated.

    • It is recommended to start with a Reserved Concurrency of 1. Once you have validated that it is working properly, you can increase this value to 4 or higher to process more events in parallel.

Add SQS trigger to Lambda

  1. On your Lambda function's overview page, in the Function overview section, click Add trigger.

  2. Choose SQS as a Source

  3. Select SQS queue as ndrc-dns-ingestion-queue.

  4. Enter 1 for Batch size (or your desired batch size).

  5. Check the Report batch item failures box. This is crucial for efficient error handling.

    Click Add.

This completes the Amazon Route 53 integration configuration workflow. Events will not populate in the Trellix NDR Web UI search page immediately after configuration. To optimize storage usage, aws-flows is disabled by default and must be manually toggled.

To enable it:

  1. Log in to the Trellix NDR CLI.  

  2. Type enable.  

  3. Type configure system.

  4. Navigate to aws-flows and set it to enable.

Note

Disabling aws-flows only blocks event visibility on the search page. Any alerts associated with these events are still be detected and displayed in the Trellix NDR Web UI.

Identify and analyze Route 53 DNS events in NDR Console

  1. Log in to the NDR Console UI.

  2. Go to the Main_menu.png (Main Menu), and select Search under Investigation.

  3. Isolate your DNS traffic coming via Route 53 DNS resolver using specific search filters and specifying time period of the events.

  4. Look for doc_values_type as dns and device-type as AWS_route53.

  5. Locate the DNS events in the results. Identify the event details for further investigation, such as Source IP, destination IP, ports, etc.

  6. Switch to the Investigation → Alerts page and filter using the IP addresses you identified. This enables you to find alerts that got triggered due to these specific DNS events.

  7. If there are alerts present, you can investigate further using the Alert Details and Asset details pages.

    For more information, see Viewing the details of the alert and Investigate assets section in NDR 4.x Product Guide.