Skip to main content
FuseFuse
IntegrationsAwsActions

Filter CloudWatch Logs events

Filter log events in one log group. start_time and end_time must be at most seven days apart. newest_first requires start_time on or after 2024-01-01T00:00:00Z. Does not unmask sensitive data. Requires logs:FilterLogEvents.

Agent markdown

cloudwatch_logs.events.filter · AWS · v1

Details

Risk
Read
Idempotency
Safe
Availability
Default
Exposure
REST, SDK, MCP
MCP hints
readOnly=true, destructive=false, idempotent=true, openWorld=true

Scopes

  • logs:FilterLogEvents

Input

Input schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
regionstringNoenum us-east-1 | us-east-2 | us-west-1 | us-west-2 | af-south-1 | ap-east-1 | ap-east-2 | ap-south-1 | ap-south-2 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-southeast-4 | ap-southeast-5 | ap-southeast-6 | ap-southeast-7 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | ca-central-1 | ca-west-1 | eu-central-1 | eu-central-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-north-1 | eu-south-1 | eu-south-2 | il-central-1 | me-central-1 | me-south-1 | mx-central-1 | sa-east-1
log_groupstringYesminLength 1; maxLength 512; pattern ^[\.-_/#A-Za-z0-9]+$
start_timestringYesminLength 1; maxLength 64
end_timestringYesminLength 1; maxLength 64
filter_patternstringNominLength 0; maxLength 1024
log_stream_namesarray<string>NominItems 1; maxItems 100
log_stream_names[]stringYesminLength 1; maxLength 512
directionstringNoenum oldest_first | newest_first
page_sizeintegerNominimum 1; maximum 1000
cursorstringNominLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$

Output

Output schema
NameTypeRequiredConstraints
(root)objectYesadditionalProperties false
eventsarray<object>YesmaxItems 1000
events[]objectYesadditionalProperties false
events[].event_idstringYesminLength 1; maxLength 128
events[].log_stream_namestringYesminLength 1; maxLength 512
events[].messagestringYesminLength 0; maxLength 262144
events[].event_timestampstringYesminLength 1; maxLength 64
events[].ingestion_timestampstringYesminLength 1; maxLength 64
next_cursorstringNominLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$

Raw schema

Input
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "region": {
      "type": "string",
      "enum": [
        "us-east-1",
        "us-east-2",
        "us-west-1",
        "us-west-2",
        "af-south-1",
        "ap-east-1",
        "ap-east-2",
        "ap-south-1",
        "ap-south-2",
        "ap-southeast-1",
        "ap-southeast-2",
        "ap-southeast-3",
        "ap-southeast-4",
        "ap-southeast-5",
        "ap-southeast-6",
        "ap-southeast-7",
        "ap-northeast-1",
        "ap-northeast-2",
        "ap-northeast-3",
        "ca-central-1",
        "ca-west-1",
        "eu-central-1",
        "eu-central-2",
        "eu-west-1",
        "eu-west-2",
        "eu-west-3",
        "eu-north-1",
        "eu-south-1",
        "eu-south-2",
        "il-central-1",
        "me-central-1",
        "me-south-1",
        "mx-central-1",
        "sa-east-1"
      ]
    },
    "log_group": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[\\.-_/#A-Za-z0-9]+$"
    },
    "start_time": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "end_time": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "filter_pattern": {
      "type": "string",
      "minLength": 0,
      "maxLength": 1024
    },
    "log_stream_names": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512
      },
      "minItems": 1,
      "maxItems": 100
    },
    "direction": {
      "type": "string",
      "enum": [
        "oldest_first",
        "newest_first"
      ]
    },
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384,
      "pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
    }
  },
  "required": [
    "log_group",
    "start_time",
    "end_time"
  ]
}
Output
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "event_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "log_stream_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "message": {
            "type": "string",
            "minLength": 0,
            "maxLength": 262144
          },
          "event_timestamp": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "ingestion_timestamp": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "event_id",
          "log_stream_name",
          "message",
          "event_timestamp",
          "ingestion_timestamp"
        ]
      },
      "maxItems": 1000
    },
    "next_cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 16384,
      "pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
    }
  },
  "required": [
    "events"
  ]
}