
Important: CloudWatch Logs supports only one subscription filter per log group. You cannot attach multiple subscription filters to the same log group. Plan your fan‑out using a destination that supports multiple consumers (for example, Kinesis Data Streams) or implement a bridging Lambda.

- Amazon Kinesis Data Streams — high throughput, ordered delivery, and multiple independent consumers.
- AWS Lambda — serverless transformation, enrichment, routing, or API‑based ingestion (e.g., calling OpenSearch Serverless).
- Amazon OpenSearch Service (managed) — indexing, search, and visualization (OpenSearch Dashboards).
- Amazon Kinesis Data Firehose — continuous delivery to S3, Redshift, or third‑party endpoints without building consumer logic.


- Very high throughput and configurable retention.
- Ordered records and replay semantics.
- Fan‑out to multiple independent consumers (real‑time alerting, archival, SIEM, fraud detection).
- Dedicated consumer groups that can read the same stream independently.
- Serverless transformation, enrichment, or routing logic.
- Integration with downstream APIs (for example, bulk indexing OpenSearch Serverless).
- A compact, code‑centric approach to process each batch from CloudWatch Logs.

- A central logging account hosts the destination (Kinesis stream or Firehose).
- Application accounts create subscription filters that forward to the central destination.
- Cross‑account IAM roles and resource policies allow the sending account to call
PutRecords(Kinesis) or deliver to Firehose.
Tip: When designing cross‑account ingestion, document the required IAM actions (for example,
kinesis:PutRecords, firehose:PutRecord) and attach least‑privilege roles in the source account. Also add resource policies on the destination to explicitly allow the source account(s).
- Central logging account hosts a Kinesis Data Stream or Firehose delivery stream sized for aggregated throughput.
- Each application account forwards relevant log events from its CloudWatch log groups to the central stream.
- The role used by the subscription must be granted
kinesis:PutRecords(or Firehose permissions) to write into the central stream. - The central stream feeds consumers for archival, analytics, SIEM ingestion, or other processing.
- Filter to only errors or warnings (exclude info/debug).
- Extract only the fields you need so downstream processing and indexes are smaller.
- Combine conditions using logical OR to capture multiple critical levels.

- Direct to OpenSearch Service (managed): If OpenSearch Service is supported as a subscription destination in your account/region, send events directly for indexing and visualization.
- Lambda bridge to OpenSearch Serverless: For Serverless, use a Lambda to transform, batch, and call the Serverless API (bulk indexing). This lets you add enrichment, batching, retries, and backoff logic.

- CloudWatch Logs subscription sends batches to Lambda.
- Lambda transforms, batches, and calls the OpenSearch Serverless API to bulk index documents.
- Lambda handles retries, error logic, and backoff; tune batch size to balance cost and latency.

- Choose Kinesis when you need multiple consumers with independent processing semantics (fan‑out).
- Typical consumers: real‑time alerting, compliance archival, fraud detection, SIEM ingestion.
- Kinesis shard count and retention determine throughput and cost; size the stream for aggregated traffic.

- Concurrency and cost: high event rates may spawn many concurrent invocations. Monitor and provision reserved concurrency where appropriate.
- Error handling and retries: implement dead‑letter queues (DLQs) or use durable intermediate stores (SQS, Kinesis) for failed records.
- Execution time limits: Lambda has a 15‑minute max runtime. For longer processing or large batch work, use durable stores or break work into smaller units.
- One subscription filter per CloudWatch log group — design for fan‑out at the destination.
- Cross‑account aggregation requires correct IAM roles and resource policies.
- OpenSearch Serverless usually needs a Lambda bridge; managed OpenSearch Service may accept direct delivery where supported.
- Use filter patterns to reduce low‑value traffic and control cost.
- Kinesis enables fan‑out and multiple independent consumers; Lambda offers flexible transformation but has concurrency and runtime limits.

- CloudWatch Logs subscription filters: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html
- Amazon Kinesis Data Streams: https://docs.aws.amazon.com/streams/latest/dev/introduction.html
- Amazon Kinesis Data Firehose: https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html
- AWS Lambda best practices: https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html
- Amazon OpenSearch Service: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/what-is.html