Lesson 2 of 3 CloudWatch Dashboards and Observability Services

Monitoring Many Accounts and Regions from One Place

This lesson explains how CloudWatch cross-account observability lets a central monitoring account see metrics, logs and traces from source accounts without copying data or switching roles.

Learning outcomes

After completing this lesson, you will be able to:

  • Configure sinks and links with Observability Access Manager.
  • Distinguish OAM from the older cross-account console option.
  • Set up a central operations account.

Monitoring accounts and source accounts

CloudWatch cross-account observability is configured with the Observability Access Manager (OAM). In the monitoring account you create a sink and a sink policy that says which accounts or organisation units may link to it. In each source account you create a link to the sink, choosing which data types to share: metrics, log groups, X-Ray traces, Application Signals services and Internet Monitor monitors. Links are Regional, so each Region is linked separately; with AWS Organizations the links can be deployed to all accounts with a CloudFormation StackSet.

Once linked, the monitoring account can graph source account metrics, create alarms on them, run Logs Insights queries across source log groups and view traces end to end. The data stays in the source accounts, and the monitoring account pays no extra cost for sharing metrics and logs. A source account can link to up to five monitoring accounts.

The following diagram shows source accounts linked to a monitoring account's sink.

CloudWatch cross-account observability. In the monitoring account, a sink and its policy say which accounts may link. Each source account creates a link per Region, choosing the data to share: metrics, log groups, traces, Application Signals and Internet Monitor. The monitoring account then graphs, alarms and queries across accounts while the data stays in the source accounts.
Links are Regional; with AWS Organizations, a StackSet can create them in every account.
True or false

Monitoring accounts

Exam skills 1.1.4 · 1.1.1

Check facts about CloudWatch cross-account observability.

Log in to try this activity Interactive activities are free with an account.

The older cross-account console option

Before OAM, CloudWatch offered a cross-account cross-Region console setting that creates the CloudWatch-CrossAccountSharingRole in each source account. Users in the monitoring account switch between accounts in the console and can build dashboards with widgets from other accounts. It still works, but it does not support cross-account alarms or cross-account Logs Insights queries in the same way, so AWS recommends cross-account observability for new setups. The following table compares the two approaches.

Cross-account observability (OAM)
SetupSink in monitoring account, link in each source account
Data typesMetrics, logs, traces, Application Signals, Internet Monitor
Alarms on source metricsYes, from the monitoring account
Cross-account log queriesYes
Cross-account cross-Region console sharing
SetupSharing role in each source account
Data typesMetrics, dashboards, automatic dashboards
Alarms on source metricsLimited
Cross-account log queriesNo
Worked example

A central operations account

A company has 30 workload accounts in two Regions and a central operations team. The team creates a sink in the operations account in each Region with a policy that allows the organisation's Workloads OU. A service-managed StackSet deploys an AWS::Oam::Link resource to every account in the OU, sharing metrics and log groups, and automatic deployment links new accounts as they join. The operations team then builds one dashboard per application that shows the ALB, Auto Scaling and RDS metrics of each account side by side, and creates alarms in the operations account that notify the on-call topic.

# In the monitoring account
aws oam create-sink --name ops-sink
aws oam put-sink-policy --sink-identifier <sink-arn> --policy file://sink-policy.json

# In each source account (or via StackSet)
aws oam create-link --label-template '$AccountName' \
  --resource-types AWS::CloudWatch::Metric AWS::Logs::LogGroup \
  --sink-identifier <sink-arn>
Check yourself

How are observability links deployed to every account in an organisation?

Show answer

With CloudFormation StackSets, once per Region, because links are Regional.

Exam Tips

Remember for the exam

  • Cross-account observability: sink in the monitoring account, links in source accounts.
  • Links are per Region; deploy them to an organisation with StackSets.
  • The monitoring account can alarm on and query source account data without copying it.
  • The older console sharing role is still available but has fewer capabilities.