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: 10 minutes 🎯 Main Learning: Building and testing Lambda@Edge functions with CloudFront is complicated, as deployments can take up to 10 minutes. With LocalStack, you can build, test, and debug your Lambda@Edge functions locally! πŸ“ Blog Post πŸ’» GitHub Repository 🎬 Watch on YouTube Hey Reader πŸ‘‹πŸ½ Happy new year! We hope you had a great time with your families and loved ones 😊 We took some time off. Sandro is bridging the cold winter in Thailand (say hi if...

AWS FOR THE REAL WORLD ⏱️ Reading time: 7 minutes 🎯 Main Learning: Learn how to securely connect to your RDS database in a private subnet using an EC2 jumphost and AWS Session Manager. No SSH keys needed. πŸ“ Blog Post πŸ’» GitHub Repository 🎬 Watch on YouTube Hey Reader πŸ‘‹πŸ½ Hope you had a great Christmas with your loved ones πŸŽ„ Tobi and I spent a few days in Berlin consulting with a startup, then caught the last sunny days in Munich before winter really hits. This week: how to actually connect to...

AWS FOR THE REAL WORLD ⏱️ Reading time: 6 minutes 🎯 Main Learning: Build a central alerting approach with CloudWatch, Lambda, EventBridge, and CDK across your AWS Organization. πŸ“ Blog Post πŸ’» GitHub Repository 🎬 Watch on YouTube Hey Reader πŸ‘‹πŸ½ Welcome to the first issue after re:Invent. For everybody who was out there, I hope you came home safe & healthy. I heard re:Invent cold is a thing like Oktoberfest cold in Munich 🍻 πŸ“° This Week in AWS ⏸️AWS Lambda Durable Functions Lambda launched Durable...