AWS

Download 604
Last updated Dec 1, 2026

aws-cloudwatch-security-hub-log-events

List CloudWatch Security Hub log events.

Syntax

aws-cloudwatch-security-hub-log-events [profile=STRING] [region=STRING] log_group=STRING [log_stream=STRING] [duration=STRING] [from=DATETIME] [to=DATETIME]

Options

profile=STRING
Optional option. The identifier of AWS connect profile When omitted, every AWS connect profile the user may use is queried.
region=STRING
Optional option. AWS region Accepts a comma separated list. When omitted, every client region of the connect profile is queried.
log_group=STRING
Required option. AWS CloudWatch log group name
log_stream=STRING
Optional option. AWS CloudWatch log stream name
duration=STRING
Optional option. Scan only recent data. You should use s(second), m(minute), h(hour), d(day), mon(month) time unit. For example, 10s means data from 10 seconds earlier.
from=DATETIME
Optional option. Start time of range. yyyyMMddHHmmss format
to=DATETIME
Optional option. End time of range. yyyyMMddHHmmss format

Output fields

FieldTypeNameDescription
aws_profilestringConnect profileThe identifier of AWS connect profile
regionstringRegion
stream_namestringLog Stream nameAWS CloudWatch log stream name
createddateCreated
ingesteddateIngested at
cw_log_accountstringCloudWatch log account
cw_log_idstringCloudWatch log ID
cw_log_detail_typestringCloudWatch log detail type
cw_log_sourcestringCloudWatch log source
cw_log_resourceslistCloudWatch log resources
cw_log_versionstringCloudWatch log version
schema_verstringSchema version
event_idstringEvent ID
product_arnstringProduct arn
generator_idstringGenerator ID
account_idstringAccount ID
account_namestringAccount name
confidence_scoreintConfidence score
criticality_scoreintCriticality score
malwarelistMalware
network_pathlistNetwork path
typeslistTypes
first_observed_atdateFirst observed at
last_observed_atdateLast observed at
updateddateUpdated
severitymapSeverity
riskstringRisk level
titlestringTitle
descriptionstringDescription
resourceslistResources
compliancemapCompliance
verification_statestringVerification state
workflowmapWorkflow
record_statestringRecord state
workflow_statestringWorkflow state
product_fieldsmapProduct fields
product_namestringProduct name
company_namestringCompany name
user_defined_fieldsmapUser defined fields
src_urlstringSource URL
ti_indicatorslistThreat intel indicators
finding_provider_fieldsmapFinding provider fields
vulnerabilitieslistVulnerabilities
threatslistThreats
networkmapNetwork
processmapProcess
containerlistContainer
is_sampleboolIs sample
remediationmapRemediation
related_findingslistRelated findings
notemapNote
patch_summarymapPatch summary
actionmapAction
processed_atdateProcessed at

Error codes

Parse errors

Error messageCauseResolution
aws-profile-not-foundNo AWS connect profile matches the name given in the profile option.Check the name on Settings > Connect Profiles and specify it again.
no-permissionThe account running the query is not granted the connect profile.Ask an administrator to grant the connect profile.
invalid-aws-regionThe region option value is not an AWS region name.Enter an exact AWS region name such as ap-northeast-2.
use-one-aws-profileMore than one connect profile was given in the profile option.Specify a single connect profile.
Specify log_group option to aws-cloudwatch-log-events commandThe log_group option is not set.Set the log_group option and run the query again.
cannot specify the duration option and the from or to option together to the aws-cloudwatch-log-events commandMutually exclusive options were given together.Specify only one of them.
invalid from option. use yyyyMMddHHmmss format.The date option is not in yyyyMMddHHmmss format.Enter 14 digits, for example 20261201093000.
invalid to option. use yyyyMMddHHmmss format.The date option is not in yyyyMMddHHmmss format.Enter 14 digits, for example 20261201093000.

Description

List CloudWatch Security Hub log events.

The following AWS IAM permissions must be allowed to use this command.

  • logs:FilterLogEvents

Without the profile and region options the command queries every client region of every connect profile the user may use, so narrowing the scope with profile and region is recommended in large environments. Each record carries the aws_profile and region fields that tell which profile and region it came from.

Examples

Example: aws-cloudwatch-security-hub-log-events

Situation: A periodic review or an incident investigation needs the result of aws-cloudwatch-security-hub-log-events.

aws-cloudwatch-security-hub-log-events log_group=/aws/example

Expected result:

aws_profileregionstream_namecreated
aws-prodap-northeast-2example-name2026-12-01 09:00:00

Interpretation: One record is one queried item. Use aws_profile and region to tell which account and region it came from, then narrow the columns with fields and either export the result or use it as the lookup stage of a detection rule.

Example: Narrowing to one account and region

Situation: Limit the scope when several connect profiles and regions exist.

aws-cloudwatch-security-hub-log-events profile=aws-prod region=ap-northeast-2 log_group=/aws/example
| limit 100

Interpretation: Narrowing the scope cuts both the number of AWS API calls and the response time. Scope every scheduled query this way.