CloudWatch Omni
CloudWatch Omni is a workspace over your account’s telemetry. People sign in to a domain, the account’s one entry point, with its own sign-in URL. Work happens in spaces inside it: each space holds SLOs, alerts and dashboards, and reads the account’s telemetry through an IAM role the space assumes, its operator role. Beside the domain, the account keeps lookup tables that queries join against, and experiments that score an AI agent’s answers.
Create a domain and a space
Section titled “Create a domain and a space”An account has one domain. Its name becomes its sign-in URL (https://<name>.cloudwatch-omni.global.app.aws), so it’s unique across all of Omni:
const domain = yield* AWS.CloudWatchOmni.Domain("Observability", { domainName: "acme-observability",});A space needs an operator role that trusts CloudWatch and carries AWS’s managed CloudWatchOmniSpaceAccessPolicy:
const { accountId } = yield* AWS.AWSEnvironment.current;
const operator = yield* AWS.IAM.Role("SpaceOperator", { assumeRolePolicyDocument: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: { Service: "cloudwatch.amazonaws.com" }, Action: ["sts:AssumeRole", "sts:TagSession", "sts:SetSourceIdentity", "sts:SetContext"], Condition: { StringEquals: { "aws:SourceAccount": accountId } }, }, ], }, managedPolicyArns: ["arn:aws:iam::aws:policy/CloudWatchOmniSpaceAccessPolicy"],});
const space = yield* AWS.CloudWatchOmni.Space("Production", { domainId: domain.domainId, dataAccessRoleArn: operator.roleArn,});Moving a space to another domain, or giving it another operator role, replaces it. A domain with spaces in it can’t be deleted until they are, so destroy deletes the spaces first.
Own an SLO in a space
Section titled “Own an SLO in a space”A space’s SLOs read the OpenTelemetry metrics your code exports, with PromQL:
yield* AWS.CloudWatchOmni.Slo("CheckoutAvailability", { spaceId: space.spaceId, serviceAttributes: { serviceName: "checkout" }, sli: { events: { good: { language: "PROMQL", expression: 'sum(rate(checkouts_total{outcome="ok"}[$__interval]))' }, total: { language: "PROMQL", expression: "sum(rate(checkouts_total[$__interval]))" }, }, }, objective: { target: 99.9, timeWindow: { rolling: { days: 30 } } },});See SLOs for period-based SLOs and reading the error budget from a runtime.
Join queries to a lookup table
Section titled “Join queries to a lookup table”A lookup table is a CSV your telemetry queries can join against, like which team owns each service:
yield* AWS.CloudWatchOmni.Lookup("ServiceOwners", { description: "Which team owns each service", body: ["service,team", "checkout,payments", "search,discovery"].join("\n"),});Changing body replaces the table’s contents in place. A runtime reads it back with the GetLookupData binding.
Score an AI agent with experiments
Section titled “Score an AI agent with experiments”An experiment evaluates an AI agent against a set of cases. Each run records how the agent answered each case, as results in a log group under /aws/cloudwatch/experiments/. CloudWatch writes those results as an execution role, which only CloudWatch, acting for this account’s experiments, may assume:
const { accountId, region } = yield* AWS.AWSEnvironment.current;
const results = yield* AWS.Logs.LogGroup("ExperimentResults", { logGroupName: "/aws/cloudwatch/experiments/support-agent",});
const role = yield* AWS.IAM.Role("ExperimentRole", { assumeRolePolicyDocument: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: { Service: "cloudwatch.amazonaws.com" }, Action: ["sts:AssumeRole"], Condition: { StringEquals: { "aws:SourceAccount": accountId }, ArnLike: { "aws:SourceArn": `arn:aws:cloudwatch:${region}:${accountId}:experiment/*` }, }, }, ], }, inlinePolicies: { results: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Action: ["logs:DescribeLogGroups"], Resource: ["*"] }, { Effect: "Allow", Action: ["logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents"], Resource: [`arn:aws:logs:${region}:${accountId}:log-group:/aws/cloudwatch/experiments/*`], }, ], }, },});
const experiment = yield* AWS.CloudWatchOmni.Experiment("SupportAgent", { target: { serviceName: "support-agent", environment: "production", definition: { custom: {} } }, dataset: { executionRoleArn: role.roleArn, resultsLogGroup: results.logGroupName },});With a custom target, your own code reports each run. Each case lists the turns of the conversation, each naming the trace your agent recorded for it:
Effect.gen(function* () { const putResults = yield* AWS.CloudWatchOmni.PutExperimentRunResults(SupportAgent); const completeRun = yield* AWS.CloudWatchOmni.CompleteExperimentRun(SupportAgent); return { fetch: Effect.gen(function* () { yield* putResults({ runId: "nightly-2026-12-01", run: { producer: { kind: "CUSTOM", name: "nightly-suite" }, dataset: { source: "OTHER", name: "golden-set" }, }, results: [ { caseId: "refund-policy", executionStatus: "COMPLETED", turns: [{ traceId, input: "What is the refund window?", output: "30 days." }], }, ], }); const { run } = yield* completeRun({ runId: "nightly-2026-12-01" }); return HttpServerResponse.json(run); }), };});To have CloudWatch call the agent itself, point the target at a Bedrock AgentCore runtime (definition: { agentCoreRuntime: { runtimeArn } }) and start runs with StartExperimentRun.
Good to know
Section titled “Good to know”- The domain is one per account. A second
Domainin the same account fails. - A freshly created execution role takes a few seconds to be usable, and creating the experiment waits for it.
- Observations and anomaly detection are in preview, and need Telemetry Intelligence turned on for the account. They aren’t covered yet.