Simplify Cross-Account Logging in 5 Steps Now! ๐Ÿ“œ


AWS FOR THE REAL WORLD
โฑ๏ธ
Reading time: 4 minutes
๐ŸŽฏ
Main Learning: AWS CloudWatch log centralization makes cross-account logging simple. Learn how to set it up, avoid gotchas, and query logs across your organization.
๐Ÿ“

Hey Reader ๐Ÿ‘‹๐Ÿฝ

another week, another newsletter about CloudWatch.

This time we're talking about a rather new feature: Log Centralization.

But quick question before we dive into this weekโ€™s CloudWatch deep diveโ€ฆ

Weโ€™re 6 weeks out from 2025 (wild, right?) and Iโ€™m curious:

If You Could Achieve Just One Thing with AWS Next Year, What Would It Be?

โ€‹

(Takes 2 seconds, helps us create better content for you in 2026 ๐Ÿ˜Š)


Alright, onto this week's CloudWatch feature...

We all know, that we should have a dedicated logging account. All logs should flow into this account. There are several reasons for having that:

  • Correlation across applications and accounts
  • Have all data secured in one account
  • โ€ฆ and some certifications also require it ๐Ÿ˜‰

But the ways of doing that where quite complicated in the past. It typically was either a self-built solution with subscription filters and Kinesis. Or you've used the Observability Access Manager.

That is where Log Centralization comes in.

This features was just launched a couple of months ago. If you use an AWS Organization you can use that to centralize all your logs with a simple click!

More of that in this week's deep dive!

Cover

๐Ÿ“š This Week's Deep Dive

AWS recommends having a central logging account.
Every landingzone setup you see out there recommends having one.
But actually centralizing logs isn't that easy.

We have written about the Observability Access Manager (OAM) before, because it is a great tool for that.
But it was still quite complicated.

Then there were many self-made solutions out there with Log Subscription filters, Data Streams, and more.
Also quite a burden.

Until now!
AWS just launched in 2025 the ability to centralize logs in an organization.
You can create rules, based on Account IDs, Organizational Units, or your whole organization.
These rules copy your logs cross-account and cross-region into your dedicated logging account.

Let's see how that looks!

You Need an Organization to Set up Rules

This feature is only available for organizations.
That means you need to have an AWS Organization.

Let's assume you have an AWS Organization set up with Controltower (what we would recommend).

You'll have different organizational units (OUs).

  • production
  • development

And you have one account called Logging.
This is the account where all of your logs should be stored.
But this is also the account (in my perspective) that should be the administrator to set up the logs.

Creating Your First Rule

Delegate an Administrator

To set up the rules you need to be a delegated administrator.
Go to your management account, CloudWatch, Settings, Organization.
In there you can assign one delegated administrator for logs.

Select your account.
I suggest using the Logging account for that.

Create your Rule

Now log into your logging account.
Go to the same settings.
You are now able to set up centralization rules in here.

You can have up to 50 rules.

A rule consists of the following things:

  • Name
  • Source Accounts
  • Source Regions

The accounts can be based on account IDs, organizational units, or on your whole organization ID.

Once you've created your rule it looks like this:

Now everything is copied over from your production OU accounts to your logging accounts.

Logs have the fields @aws.account and @aws.region

The logs now have some additional fields for the account number and the region.
These fields are visible in Logs Insights.

To be honest, it is quite hard to know which Log Group belongs to which account and which source region.
This is why you should use logs insights here.

๐Ÿ™๐Ÿฝ AWS Wishlist #1 - Please give us an opportunity to prefix, suffix Log Group names. Or show any other indicator where this Log Group is coming from.

I recommend going into Logs Insights and executing a query like that:

fields @timestamp, @aws.account, @aws.region, @message, @logStream, @log
| filter @aws.account = 123456789012 and @aws.region = 'us-west-2'
| sort @timestamp desc
| limit 100

With that you can see all logs from a specific account and a specific region.
Since these fields are also indexed they shouldn't occur many or any costs (need to revise that ๐Ÿ˜ƒ).

Additional Settings like Retention Are Stripped of

One very important part is that settings of the Log Groups are not applied anymore.
For instance the retention setting of how long the logs are stored is gone.

It makes sense to have a kind of two-tiered strategy of your logs.
In your application accounts you could save them for 30 days.
In your central account you can save them for 1 year.
This is often necessary anyway for certifications like SOC2 or ISO27001.

However, it is weird that we can't set this up while creating the rules.

๐Ÿ™๐Ÿฝ AWS Wishlist #2 - Please give us additional settings when creating rules that are applied on the Log Groups.

I've handled that with a CRON Job, a Lambda function, and some smart retries to overcome any rate limits.

We set up mainly:

  • data retention
  • data protection policies

Protected fields that were protected by a data policy should be still masked.
But to be sure, and to not only rely on the member accounts to use them correctly I would apply them again.
This is what I'm doing in the CRON job.

Pricing

The first copy of your log copy is free.
After that, you pay a charge of $0.05/GB of logs copies.
Which is quite fair in my perspective!

Additionally, you have the normal storage costs of CloudWatch.

๐Ÿš€ Read the Full Tutorial โ†’

โ€‹


That's it for this week! Keep an eye out for all the re:Invent launches in the upcoming weeks ๐Ÿ‘€ Best, Sandro & Tobi

โ€‹

โ€‹

โ€‹

AWS for the Real World

We teach AWS for the real world - not for certifications. Join more than 10,500 developers learning how to build real-world applications on AWS.

Read more from AWS for the Real World

AWS FOR THE REAL WORLD โฑ๏ธ Reading time: 20 minutes ๐ŸŽฏ Main Learning: How to achieve end-to-end observability by integrating CloudWatch Application Signals with OpenTelemetry for automatic service discovery and cross-service request tracing in AWS. ๐Ÿ“ Blog Post ๐Ÿ’ป GitHub Repository Hey Reader ๐Ÿ‘‹๐Ÿฝ Welcome to this weekโ€™s AWS Fundamentals Newsletter. Pre:Invent season is starting slowly with new launches like: Bigger payload sizes for Kinesis and async Lambda invocations CloudWatchโ€™s interactive...

AWS FOR THE REAL WORLD โฑ๏ธ Reading time: 17 minutes ๐ŸŽฏ Main Learning: How to build a secure, scalable AWS landing zone using AWS Organizations, Service Control Policies, and Identity Center for centralized account and user management. ๐Ÿ“ Blog Post Hey Reader ๐Ÿ‘‹๐ŸฝToday I want to dig into how to set up a proper AWS landing zone. Weโ€™ll be chatting about AWS Organizations, Service Control Policies (SCPs), and Identity Center. These are the core tools I reach for when I need to get accounts organized,...

AWS FOR THE REAL WORLD โฑ๏ธ Reading time: 15 minutes ๐ŸŽฏ Main Learning: How to build an automated related posts feature by leveraging Bedrock Knowledge Bases and Amazon S3 Vectors for content discovery. ๐Ÿ“ Blog Post Hey Reader ๐Ÿ‘‹๐ŸฝEver wanted to show folks โ€œrelated postsโ€ but didnโ€™t want to build your own search from scratch? Weโ€™ve been playing with Bedrock Knowledgebases and S3 vectors, and turns out, it makes that job way easier than expected.Weโ€™ll go over how you can use these tools to connect...