Try it free

Ingest AWS logs from Amazon S3

  • Latest Dynatrace
  • How-to guide
  • 16-min read
  • Published Aug 12, 2026

The Dynatrace S3 log forwarder ships logs to Dynatrace directly from one or multiple Amazon S3 bucket(s) using an event-driven AWS Lambda function that you deploy in your own AWS account.

To start forwarding logs, see our deployment guide.

Overview

What this method includes:

  • CloudFormation-based onboarding: Deploy the forwarder components in your AWS account using CloudFormation templates.

  • Event-driven ingestion: New S3 objects trigger processing and forwarding to Dynatrace with no polling loop required at the source service level.

  • Log enrichment: For supported sources, records include attributes such as aws.account.id, aws.region, and aws.service.

  • Entity linking: When the source account has an AWS connection with healthy topology collection, records can be linked to Smartscape entities for richer in-context analysis.

    Without an AWS connection for a source account, logs are still ingested, but entity linking, cloud metadata enrichment, and logs in context are not available for that account.

  • In-place upgrades: Upgrade by running a CloudFormation stack update, without rebuilding the architecture from scratch.

  • Operational observability: The forwarder publishes CloudWatch metrics and diagnostic logs so operational issues can be investigated from your AWS account.

When to use S3 log forwarding

Many AWS services deliver logs natively to S3, including CloudTrail, VPC Flow Logs, ELB access logs, CloudFront logs, and S3 server access logs.

Compared with CloudWatch Logs via Amazon Data Firehose, direct S3 ingest offers:

  • Reduced pipeline complexity for S3-native log sources when ingesting directly from S3 buckets.
  • Better fit in environments where Firehose deployment is restricted.
  • Built for S3 native log sources—ingest logs such as CloudTrail, VPC Flow Logs, ELB, CloudFront, and S3 access logs directly from S3, without routing via AWS CloudWatch Logs.
  • Event-driven scaling as new logs are written to configured S3 buckets.
  • Provides flexible centralized or distributed deployment models across AWS accounts and regions.

This feature is based on the Dynatrace AWS platform monitoring S3 log forwarder project.

How it works

  1. An AWS service writes logs to a S3 bucket (typically using a per-service key prefix).
  2. An S3 Object Created notification is routed through EventBridge, direct S3-to-SQS delivery, or SNS fan-out.
  3. The forwarder Lambda reads batched SQS notifications, where each message carries event metadata rather than full log payloads.
  4. The Lambda retrieves the objects from S3, parses records, and applies enrichment.
  5. Records are forwarded to the Dynatrace log ingest API via HTTPS and then processed in OpenPipeline before being stored in Grail.

Supported log sources

The forwarder provides out-of-the-box processing for supported AWS service logs.

For the current supported source list, see supported AWS services.

Additionally, you can forward and ingest generic text logs and JSON streams, then parse and enrich them by using OpenPipeline processing rules.

Log records with timestamps older than 24 hours are dropped at ingest.

Supported AWS service resources

The following table lists supported AWS service resources for log records linking and enrichment.

Service nameLinked resource typeLog record parsing

CloudTrail

-

VPC Flow Logs

AWS::EC2::FlowLog

Route 53 Resolver (VPC Query Logs)

AWS::EC2::VPC

Application Load Balancer (ALB)

AWS::ElasticLoadBalancingV2::LoadBalancer

Applicable

AWS AppFabric

AWS::AppFabric::Ingestion

Applicable

Network Load Balancer (NLB)

AWS::ElasticLoadBalancingV2::LoadBalancer

Applicable

Classic Load Balancer (CLB)

AWS::ElasticLoadBalancing::LoadBalancer

Applicable

CloudFront

AWS::CloudFront::Distribution

S3 Server Access Logging

AWS::S3::Bucket

Applicable

Amazon Redshift

AWS::Redshift::Cluster

Applicable

AWS Global Accelerator

AWS::GlobalAccelerator::Accelerator

Applicable

AWS Network Firewall

AWS::NetworkFirewall::Firewall

Applicable

AWS WAF

AWS::WAFv2::WebACL

Amazon MSK

AWS::MSK::Cluster

Applicable

Choose between Firehose and S3 forwarding

Both methods are supported and can run in parallel.

ConsiderationCloudWatch Logs via FirehoseDirect ingest from S3

Best for

Sources already writing to CloudWatch Logs

Sources natively writing to S3 (such as CloudTrail, VPC Flow Logs, ELB, CloudFront, S3 access logs)

Cost profile

Includes CloudWatch Logs and Firehose charges

Avoids CloudWatch Logs and Firehose charges for S3-native sources

Deployment model

Created as part of AWS connection onboarding

Standalone CloudFormation deployment

Deployment architecture

Per-region Firehose streams or a centralized Firehose with cross-account/cross-region subscriptions

Single forwarder Lambda in a central logging account, or distributed deployment by account or region

Entity linking and enrichment

Supported for supported sources, with AWS connection and compatible source path

Yes for supported sources. Requires: AWS accounts sourcing logs are onboarded as active (healthy) AWS connections in Dynatrace (topology collection at minimum)

Get started

The default deployment follows the simplest onboarding path: one AWS account in one AWS region. For most teams, this is the fastest way to start forwarding logs from S3 to Dynatrace.

In this default setup, the SQS queue also provides resiliency. The forwarder retries transient failures and, if an object still cannot be processed, moves the message to a dead-letter queue so events are not silently lost and can be investigated or reprocessed.

Prerequisites

  • Dynatrace platform token with data-acquisition:logs:ingest scope.
  • One or more S3 buckets receiving logs and permission to configure S3 event notifications for these.
  • Recommended AWS connection per source account for linking and enrichment.

Deploy

For full deployment steps, including token storage options, S3 notification methods, and prefix filtering, see the deployment guide.

Upgrade

To upgrade an existing deployment, run a CloudFormation stack update as described in the update guide.

Multi-account and multi-region

For advanced centralized and cross-account deployment patterns, see advanced deployments.

In centralized patterns, logs remain in source buckets and only S3 Object Created events are routed cross-account to the forwarder account. The forwarder then reads source objects directly using configured cross-account access, which enables central processing without replicating every source log bucket.

  • Logs stay in the source account: AWS services write logs directly to S3 buckets in their originating accounts—no bucket replication, Firehose, or per-account forwarders required.
  • EventBridge enables cross-account delivery: Source accounts forward S3 Object Created events to a centralized EventBridge bus, which routes them to the forwarder's SQS queue.
  • Forwarder Lambda retrieves logs on demand: SQS carries only S3 event notifications; the Lambda fetches log objects directly from source buckets. Source bucket policies must grant s3:GetObject permission to the forwarder's IAM role, and you must disable ACLs. This event-payload separation also enables efficient batching.
  • One AWS connection in Dynatrace per source account: Required for Dynatrace topology polling, entity linking, log enrichment, and logs-in-context.

Migrate from the classic S3 forwarder

Treat migration as side-by-side adoption, not in-place replacement:

  1. Ensure the target environment runs latest Dynatrace.
  2. Deploy the new S3 log forwarder alongside the classic deployment.
  3. Validate log arrival, enrichment, and linking.
  4. Gradually stop forwarding from the classic deployment.

Monitor the S3 log forwarder

The forwarder emits CloudWatch metrics for processing, failure, and delivery health. See function metrics. Use the Any Metrics feature to ingest those metrics via the AWS connection in Dynatrace for custom operational dashboards and troubleshooting workflows.

Limitations and considerations

  • AWS connection required for context features: Logs from accounts without an AWS connection are ingested but not linked or enriched.
  • CloudFormation deployment model: Deployment and upgrade use CloudFormation templates.
  • 24-hour timestamp limit: Older records are dropped at ingest.

FAQ

Getting started and prerequisites

What do I need before I can deploy the S3 log forwarder?

Three things:

  • The AWS CLI (or AWS CloudShell/Cloud9 if you're on Windows)
  • Dynatrace platform token with the data-acquisition:logs:ingest permission scope
  • The name(s) of the centralized S3 bucket(s) you want to forward from.

Everything else—the Lambda, SQS queues, IAM role, and event routing—is created for you by a single CloudFormation template.

Do I have to create a Dynatrace AWS connection to use this?

No. The S3 logs forwarder can be deployed into your AWS account(s) without an AWS connection—you only need a valid ingest platform token and the required AWS permissions.

Be aware of the trade-off: without an AWS connection (with at least topology collection) for the source account, logs are still ingested, yet you node(entity) linking will not work, cloud metadata enrichment, and logs-in-context. If topology-aware analysis matters for a given account, onboard it as an AWS connection.

x86_64 or arm64? Lambda Layer or ZIP?

Both architectures are supported—pick the one that matches your estate and make sure the Layer ARN or ZIP package matches it. For the deployment package, the Lambda Layer option is the default and simplest (no build tools, no SAM CLI, no Python required); the ZIP option is available if you'd rather package the function code yourself.

One note: keep your CloudFormation stack name to 47 characters or fewer, or deployment will fail.

Log sources and the data itself

Can I forward logs that aren't standard?

Yes. Any text-based log can be ingested as a generic log, and a stream of JSON entries can be ingested using the generic_json_stream source. You can then process/enrich those logs at ingestion time in Dynatrace or parse them at query time with DQL.

For more advanced needs, you can define custom log processing rules so the Lambda extracts entries the way you want.

Why are some of my logs not showing up in Dynatrace?

The most common reasons:

  • The object's S3 key didn't match any forwarding rule, so it was intentionally dropped—the forwarder only ships what matches a rule, and if you've removed the catch-all default rule, each bucket needs an explicit rule

  • The log events are older than 24 hours, which Dynatrace drops on ingest

  • A processing/decoding failure—the DroppedObjectsNotMatchingFwdRules, DroppedObjectsDecodingErrors, and LogProcessingFailures CloudWatch metrics tell you which case you're in.

What context gets added to my forwarded logs?

Every log record is automatically annotated with log.source.aws.s3.bucket.name, log.source.aws.s3.key.name, and cloud.log_forwarder (the ARN of the forwarding Lambda, useful when you run more than one instance).

For supported AWS services, the forwarder also extracts service-specific attributes such as aws.account.id and aws.region. If you've onboarded the source account as an AWS connection, records are additionally linked to their Smartscape entity.

Can I add my own tags to forwarded logs?

Yes. Log forwarding rules support custom annotations (for example team: payments or environment: dev), which are added as attributes to the matching log entries.

How do I verify logs arrive in Dynatrace?

Use Logs Logs in Dynatrace, or run a DQL query. For example:

  • To see everything from one bucket

    fetch logs
    | filter log.source.aws.s3.bucket.name == "mybucket"
  • To see CloudTrail specifically

    fetch logs
    | filter aws.service == "cloudtrail".

Security and access

How is my Dynatrace token stored and secured?

You choose from three mutually exclusive options at deploy time: reference an existing AWS Secrets Manager secret (recommended), store the token as a SSM Parameter Store SecureString parameter, or pass it as plain text—in which case the stack creates a Secrets Manager secret for you.

The token is never hardcoded into the function.

My S3 objects are encrypted with a customer-managed KMS key. Will the forwarder work?

Yes, once you grant it access. Add the KmsKeyArns parameter (a comma-separated list of key ARNs) to your deploy command so the Lambda can decrypt the objects it reads.

What IAM permissions does the forwarder need?

The CloudFormation template creates the required IAM role and permissions for you. If your organization enforces an IAM role path (for example: /engineering/platform/), set the IamRolePath parameter so the role is created where your governance policy expects it.

Reliability and operations

What happens if a log file can't be processed or delivered?

The forwarder retries a failed object up to three times. If it still fails, the SQS message is moved to a Dead Letter Queue (DLQ), where it's retained for up to one day.

You can inspect the DLQ and the Lambda's own logs to find the cause, and if it was a transient issue you can redrive the messages from the DLQ to reprocess them. You can tune this with MaximumSQSMessageRetries (default 3), SQSVisibilityTimeout (default 420s), and SQSLongPollingMaxSeconds (default 20s).

How do I get alerted when something goes wrong?

The template configures a CloudWatch alarm that fires whenever messages land in the DLQ. Add the NotificationsEmail parameter to receive email alerts, or subscribe your own tooling (for example: PagerDuty or ServiceNow) to the SNS topic the stack creates.

How do I monitor the forwarder\s health and troubleshoot ingest issues myself?

The Lambda publishes its own CloudWatch metrics under a namespace named after your stack, including LogFilesProcessed, LogProcessingFailures, DynatraceHTTP204Success, DynatraceHTTP429Throttled, LogMessagesTrimmed, and processing/ingestion timing metrics.

The Lambda also emits its own diagnostic logs, so first-line investigation happens entirely in your AWS account without needing to open a Dynatrace support ticket. If you run multiple deployments in the same account and region, each publishes its own metrics under a deployment dimension matching its stack name.

How much volume can it handle, and how does it scale?

The forwarder is event-driven: new objects landing in S3 trigger the Lambda on arrival, so throughput scales automatically with log volume. It has been tested at 10 GB/min.

For high-throughput scenarios we recommend raising the MaximumLambdaConcurrency parameter.

How do I upgrade to a new version?

Upgrades are in place: run a CloudFormation stack update with the new templates (and, for Layer deployments, the new Layer ARN)—no redeployment or migration needed.

Updates to the latest version are supported from v0.4.4 onward. To roll back, repeat the update using the previous version tag.

Multi-account, filtering and architecture

Do I have to forward an entire bucket, or can I filter by prefix?

Both are possible. The S3BucketNames parameter forwards everything from the listed buckets. To forward only specific key prefixes (for example AWSLogs/123456789012/CloudTrail/), deploy the per-bucket configuration template instead—it supports up to 10 prefixes per bucket. Don't do both for the same bucket, or objects will be ingested twice.

Can a single deployment cover multiple accounts and regions?

Yes. The forwarder supports a centralized model—one Lambda in a central logging account and region pulling logs from buckets in many source accounts and regions—as well as a distributed model (a forwarder per account and/or region).

The centralized, cross-account/cross-region pattern is a common enterprise setup: source accounts forward S3 object-created notifications cross-account to the central event bus, and the central Lambda reaches back into each source bucket to fetch the object.

Note that this centralized pattern is a well-known customer pattern rather than a Dynatrace-recommended one—you remain responsible for how spoke accounts ship or replicate logs into the central buckets.

How many S3 buckets can one deployment handle?

Each per-bucket configuration adds an inline statement to the Lambda's IAM role, and IAM caps a role's inline policy size at 10,240 characters. In practice that's roughly 20–25 buckets with the template as shipped. If you need more, you can optimize the policy (for example, using wildcards for buckets that share a common name prefix).

Which S3 notification method should I use?

Three are supported:

  • Amazon EventBridge is recommended and is required for cross-account or cross-region setups.
  • Direct S3-to-SQS works only for buckets in the same account and region as the forwarder.
  • SNS fan-out is useful when multiple consumers required to read the same S3 events, or when you already have an SNS topic receiving notifications.
How do I change which logs are forwarded, or how they're parsed, without redeploying?

Deploy the optional AppConfig template and set LogForwarderConfigurationLocation=aws-appconfig.

Your log-forwarding-rules and log-processing-rules then live in AWS AppConfig, and the Lambda picks up edits within about a minute—no Lambda redeployment required.

Migration and coexistence

Can I run this alongside the Firehose-based ingest method?

Yes, the two methods are complementary and fully supported side by side. A common split is Firehose for application logs already in CloudWatch, and S3 ingest for S3-native sources like CloudTrail and VPC Flow Logs.

Which one fits a given source depends on where the logs already land and your operational constraints; review the comparison in the release notes and choose per source.

How do I move from the classic S3 log forwarder to this one?

Treat it as a migration, not an in-place upgrade. Deploy the new S3 log forwarder alongside your existing classic forwarder. Confirm logs arrive on the new cloud platform monitoring endpoints, then gradually stop shipping from the classic forwarder—for example by deactivating its access tokens or its Lambda function.

Related topics

  • Create a new AWS connection
  • AWS logs
Related tags
Infrastructure Observability