Black Friday sale: an extra 40% off every course until Monday, November 30.New Year sale: an extra 30% off every course until Friday, January 1.Memorial Day sale: an extra 25% off every course until Monday, May 31.SysAdmin Day sale: an extra 25% off every course until Sunday, August 1.Back to School sale: an extra 25% off every course until Sunday, August 22.Labor Day sale: an extra 25% off every course until Monday, September 6.Black Friday sale: an extra 40% off every course until Monday, November 29.New Year sale: an extra 30% off every course until Saturday, January 1.Choose your certification →

Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.2.1.7. Creating CloudWatch Metrics from Log Events (Metric Filters)

3.2.1.7. Streaming & Subscription-Based Log Processing

Sometimes you need logs processed in real-time — for alerting, transformation, or forwarding to external systems. CloudWatch Logs subscriptions enable this.

Subscription filters stream matching log events to a destination in real-time:

DestinationUse CaseLatency
LambdaTransform, filter, or enrich log eventsSeconds
Kinesis Data StreamsHigh-volume streaming to multiple consumersSeconds
Amazon Data FirehoseBatch delivery to S3, OpenSearch, SplunkBuffer interval 0-900 seconds (300 by default)
OpenSearchFull-text search and visualizationSeconds (via Lambda/Firehose)
# Stream ERROR logs to a Lambda function for alerting
aws logs put-subscription-filter \
  --log-group-name "/prod/app/api" \
  --filter-name "ErrorsToLambda" \
  --filter-pattern '"ERROR"' \
  --destination-arn "arn:aws:lambda:us-east-1:123456789012:function:ErrorAlertHandler"

Cross-account log aggregation uses subscription filters to stream logs from application accounts to a centralized logging account. In the logging account you create a CloudWatch Logs destination — a resource that wraps a Kinesis Data Stream or Firehose stream — whose access policy names the source accounts (or organization) allowed to call PutSubscriptionFilter against it; each source account then points its subscription filter at the destination ARN.

Architecture pattern: Centralized logging
Account A → CW Logs → Subscription Filter → Amazon Data Firehose → S3 (Log Archive Account)
Account B → CW Logs → Subscription Filter ↗
Account C → CW Logs → Subscription Filter ↗

Exam Trap: Each log group supports at most five subscription filters, and that quota can't be increased. If a log group needs more destinations than it has free filter slots, use a single Kinesis Data Stream as the subscription target and then fan out to multiple consumers (Lambda, Firehose, custom app) from the stream.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•26 professional certifications earned