Skip to main content
Sumo Logic

Collect Logs for the Amazon GuardDuty App

This page has instructions for collecting logs for the Amazon GuardDuty App.

Collection overview

  1. Amazon GuardDuty sends notifications based on CloudWatch events when new findings, or new occurrences of existing findings, are generated.
  2. A CloudWatch events rule enables CloudWatch to send events for the GuardDuty findings to the Sumo CloudWatchEventFunction Lambda function.
  3. The Lambda function sends the events to an HTTP source on a Sumo hosted collector.

This configuration is defined in a AWS Serverless Application Model (SAM) specification published in the AWS Serverless Application Repository. You don't need to manually create the necessary AWS resources. You simply deploy the configuration, as described in Step 2 below.

Step 1: Configure an HTTP source

  1. In Sumo Logic, configure a Hosted Collector.
  2. In Sumo Logic, configure an HTTP Source.  When you configure the source, in the Advanced Options for Logs section of the page:
    1. Specify Format as yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 
    2. Specify Timestamp locator as .*"updatedAt":"(.*)".*

Step 2: Deploy Sumo GuardDuty events processor

In this step, you deploy the events processor. This will create the AWS resources described in Collection overview.

  1. Go to
  2. Search for “sumologic-guardduty-events-processor”. 
  3. When the page for the Sumo app appears, click Deploy.
  4. In Configure application parameters panel, paste the URL for the HTTP source you created above.
  5. Click Deploy.

Configure optional environment variables

  1. Go to the AWS Lambda console.
  2. Search for the "aws-serverless-repository-CloudWatchEventFunction-<suffix>" function and click it.
  3. Scroll down to the Environment variables section.

    You can set any of the following optional variables:
    • ENCODING (Optional). Encoding to use when decoding CloudWatch log events. Default is utf-8.
    • SOURCE_CATEGORY_OVERRIDE (Optional). Override _sourceCategory value configured for the HTTP source.
    • SOURCE_HOST_OVERRIDE (Optional). Override _sourceHost value configured for the HTTP source.
    • SOURCE_NAME_OVERRIDE (Optional). Override _sourceName value configured for the HTTP source.

Sample log message



                  "asnOrg":"SK Broadband Co Ltd",
                  "isp":"SK Broadband",
                  "org":"SK Broadband"
                  "countryName":"South Korea"
   "title":"Unprotected port in EC2 Instance i-0d6c314027f74dc82 is being probed.",
   "description":"EC2 Instance i-0d6c314027f74dc82 has an unprotected port 22 which is being probed by a known malicious host with IP address"

Query Sample

Threat details

| json field=_raw "accountId", "region", "partition", "id", "arn", "type","service.serviceName","service.detectorId","service.action","severity","title","description" nodrop
| json field=_raw "resource.resourceType" as resourceType nodrop
| json field=%service.action "networkConnectionAction.remoteIpDetails.ipAddressV4" as ip nodrop
| json field=%service.action "networkConnectionAction.localPortDetails.port" as localPort nodrop
| parse "\"vpcId\": \"*\"" as vpcId, "\"subnetId\": \"*\"" as subnetId,"\"groupId\": \"*\"" as securityGroupId,"\"tags\": [*]" as tags,"\"groupName\": \"*\"" as securityGroupName nodrop
| json field=_raw "resource.instanceDetails.instanceId" as instanceid nodrop
| if(severity=2, "Low", if(severity=5, "Medium", if(severity=8, "High",severity))) as severity
| if(!isNull(instanceid),concat ("https://",region,"",region,"#Instances:search=",instanceid),"") as link
| json field=%service.action "networkConnectionAction.remoteIpDetails.geoLocation.lon" as longitude nodrop
| json field=%service.action "" as latitude nodrop
| json field=%service.action "networkConnectionAction.remoteIpDetails.organization.asnOrg" as asnOrg nodrop
| json field=%service.action "" as organization nodrop
| json field=%service.action "networkConnectionAction.remoteIpDetails.organization.isp" as isp nodrop
| count as count by title, accountId, resourceType, organization, isp, ip, link
| sort count