What did that transformation cost? Attributing AWS Transform custom spend, agent minute by agent minute, with CloudWatch

Operational metrics say what each run did; the billing namespace says what it cost, and the two live in different places. A practitioner's guide to the dimensions, Metrics Insights queries, and region split that turn one bill total into spend you can trace to a single transformation or repository.

Specialist SA for Modernisation
A monthly bill tells you what you spent. It does not tell you where the money went, which transformation earned it, or whether the run that burned an afternoon of agent minutes ever finished. For a tool you run across many repositories, that gap is the whole problem. The total is a number you react to; attribution is a number you can act on.
AWS Transform custom closes the gap through Amazon CloudWatch. It emits operational metrics as transformations run, and it reports estimated charges through the billing metrics every account already has. The two answer different questions, and the discipline of this post is keeping them in their lanes: attribute cost with the operational metrics (assign each unit of spend to the transformation or repository that caused it), and reconcile it with the billing metric (check that total against the invoice AWS actually issues).

Two namespaces, two jobs

AWS Transform custom observability lives in two CloudWatch namespaces.
 AWS/TransformCustom  carries the operational signals: agent minutes, execution counts, durations, files read, and code churn. These tell you what the platform did. They hold no dollar amounts.
 AWS/Billing  carries  EstimatedCharges , the only metric with actual dollars. It tells you what the platform cost.
Agent minutes are the billing unit for AWS Transform custom, so the operational namespace is where cost attribution starts: group agent minutes by transformation or repository and you see where the spend concentrates. The billing namespace is where you reconcile:  EstimatedCharges  is the figure that matches the invoice. Attribute with one, reconcile with the other, and never ask a question of the namespace that cannot answer it.

The operational metrics

Everything below lives in  AWS/TransformCustom . It helps to read the metrics in two families: what a run consumed, and what it changed.

Cost and usage: what a run consumed

Metric
What it reports
Unit
Why you watch it
 AgentExecutionMinutes 
Agent minutes consumed, per execution segment
Minutes
Billing driver: every cost figure in this post starts from this metric.
 ExecutionDuration 
Wall-clock time of an execution
Seconds
Performance signal: long runs are expensive runs, so watch the outliers.
 TransformationExecutionStarted 
Executions started
Count
Throughput and adoption: how many runs you launch, and the baseline that cost is read against.
 TransformationExecutionCompleted 
Executions completed
Count
Success signal: set against started, it exposes runs that stall or fail.
 ConversationStarted 
CLI conversations started
Count
Client-side usage: how often the CLI is actually picked up.
 FilesRead 
Files read during a transformation
Count
Workload size: a proxy for how much code a run worked through.
Two pairings do most of the work.  TransformationExecutionStarted  against  TransformationExecutionCompleted  shows how many runs finish versus stall.  AgentExecutionMinutes  against  FilesRead  gives you cost per unit of work, the number that should fall as your transformation definitions mature.
One relationship catches people off guard: agent minutes are not wall-clock minutes. When a transformation runs, AWS Transform custom's orchestrator decides autonomously how many agents to put on the work; the user does not set that number. The orchestrator often runs several agents in parallel, so an execution that takes 30 minutes of wall-clock time ( ExecutionDuration ) can consume well over 30 agent minutes ( AgentExecutionMinutes ). Read  ExecutionDuration  as how long you waited and  AgentExecutionMinutes  as how much you are billed. The second routinely exceeds the first, and that is expected, not a reporting error.

Impact: what a run changed

Metric
What it reports
Unit
Why you watch it
 FilesModified 
Files changed by a transformation
Count
Reach: how much of the codebase a run rewrote, not just read.
 LinesAdded 
Lines added
Count
Output: volume of new code produced.
 LinesDeleted 
Lines removed
Count
Cleanup: how much legacy code a run retired.
 LinesModified 
Lines changed in place
Count
Churn: edits to existing lines; pair with added and deleted for the full diff size.
These are the counterparts to agent minutes: the "what did I get for the spend" side. Divide  AgentExecutionMinutes  by  LinesModified  (or the sum of added, deleted, and modified) and you have cost per line changed, the efficiency number that tells you whether a transformation definition is earning its minutes.
That ratio only means something for remediation transformations, the ones that rewrite code. Analysis transformations such as  AWS/business-rules-extraction  or  AWS/comprehensive-codebase-analysis  produce reports, not diffs, so they legitimately change zero lines however many minutes they consume. Judge those on agent minutes against the scope they covered ( FilesRead ), not on lines changed.
One lifecycle metric sits apart from both families.  TransformationDefinitionPublished  counts publish and update events for a transformation definition, carrying two dimensions of its own,  IsPublish  and  IsUpdate , that separate a first publish from a later revision. It tracks how often a transformation definition changes, not what any single run cost or changed.

The dimensions that make them useful

A metric you cannot slice is a metric you cannot act on. These are the dimensions worth grouping on for cost:
Dimension
Example values
Group by it to see
 TransformationName 
 AWS/comprehensive-codebase-analysis ,  AWS/business-rules-extraction 
Cost per transformation
 RepositoryName 
 cypress-realworld-app ,  spring-petclinic 
Cost per repository
 ExecutionStatus 
 Success ,  InProgress 
Successful versus in-flight or wasted minutes
 ExecutionType 
 Supervised ,  Unsupervised 
Cost by execution mode.  Supervised  points to a developer running the transformation definition interactively on a laptop;  Unsupervised  to a non-interactive run, typically the AWS Transform CLI ( atx ) inside an automated pipeline.
 TransformationType 
 customer_custom ,  aws_managed 
Custom versus AWS-managed transformation definitions
 TransformationVersion 
version ID
Cost by version
 TransformationVersionType 
 draft ,  published 
Draft iteration versus published runs
 TransformationName  and  RepositoryName  are the two you reach for first. They answer what a team actually asks: which transformation burns the budget, and which application costs the most to modernize.
A dimension can carry values beyond the examples shown here.  list-metrics  only surfaces values that have actually appeared in emitted data, and only for metrics that received data in the last two weeks, so a dimension with light or narrow usage can look narrower than it really is. Treat the example column as what has been observed, not an exhaustive enum; your account may show values this post does not.
Not every metric carries every dimension, and the exception that matters is the billing driver itself.  AgentExecutionMinutes  carries  TransformationName ,  RepositoryName ,  ExecutionStatus ,  ExecutionType , and  TransformationVersion , but not  TransformationType  or  TransformationVersionType . So you cannot split agent minutes directly by custom-versus-managed or draft-versus-published. When you need those cuts, read them from the count, duration, or line-change metrics, which do carry them.
One rule keeps any later dashboard readable: aggregate on low-cardinality dimensions, the ones above. AWS Transform custom also emits per-execution, per-session, and per-segment identifiers ( ExecutionId ,  ConversationId ,  SegmentIndex ), deliberately left out of the table: never group by those. Each new execution, session, or segment mints a fresh value, and the graph collapses into thousands of one-point series.

Two namespaces, two Regions

The two namespaces do not always publish in the same Region.  AWS/Billing  publishes only in  us-east-1 , as it does for every AWS service, while  AWS/TransformCustom  publishes in the Region where the transformation runs. If your transformations run in  us-east-1 , both the operational metrics and the billing metric land in the same Region. That is a convenience, not a rule: run AWS Transform custom in any other Region and the operational metrics move with it while billing stays in  us-east-1 , leaving you reading two Regions at once.
So the first thing to get right is which Region you point at. Empty operational graphs usually mean you are looking somewhere other than the Region your transformations run in. An empty  EstimatedCharges  usually means you are outside  us-east-1 , or that billing alerts were never enabled on the account. Billing metrics also refresh only a few times a day and report worldwide charges, so they are right for reconciliation and wrong for anything real-time.
Know this before you build the dashboard, not after.

Hands-on: pull the numbers

Confirm what is emitting in your run Region (here,  us-east-1 ):
aws cloudwatch list-metrics \
--namespace AWS/TransformCustom \
--region us-east-1
Agent minutes per transformation over the last week, biggest spender first:
aws cloudwatch get-metric-data \
--region us-east-1 \
--start-time 2026-10-06T00:00:00Z \
--end-time 2026-10-13T00:00:00Z \
--metric-data-queries '[
{
"Id": "minutes",
"Expression": "SELECT SUM(AgentExecutionMinutes) FROM \"AWS/TransformCustom\" GROUP BY TransformationName ORDER BY SUM() DESC",
"Period": 86400
}
]'
Swap  GROUP BY TransformationName  for  GROUP BY RepositoryName  to see the same spend by application, or narrow to one transformation with  WHERE TransformationName = 'AWS/comprehensive-codebase-analysis'  in place of the  GROUP BY .
A word on why the query looks like SQL. These are CloudWatch Metrics Insights queries, and they are not optional here. CloudWatch identifies a metric by its complete dimension set, and  AgentExecutionMinutes  always carries eight dimensions, down to the individual  ExecutionId . A plain  get-metric-statistics  call that names only  TransformationName  describes a metric that does not exist and returns nothing, and so does a query with no dimensions at all. Metrics Insights is the mechanism that aggregates across those dimension values, which is exactly what "cost per transformation" needs.
Metrics Insights has one hard limit that matters for cost work: a query covers at most the trailing two weeks. Ask for more and CloudWatch returns the most recent two weeks with a  MaxQueryTimeRangeExceeded  message buried in the response, so a 30-day query looks like it worked and quietly under-reports. To attribute a full billing month, run the query on a schedule at least every two weeks and keep the results, for example from an Amazon EventBridge rule that invokes an AWS Lambda function and writes to Amazon S3.
Started against completed, to catch runs that never finish.  get-metric-data  accepts one Metrics Insights expression per call, so this is two calls:
aws cloudwatch get-metric-data \
--region us-east-1 \
--start-time 2026-10-06T00:00:00Z \
--end-time 2026-10-13T00:00:00Z \
--metric-data-queries '[
{
"Id": "started",
"Expression": "SELECT SUM(TransformationExecutionStarted) FROM \"AWS/TransformCustom\"",
"Period": 86400
}
]'

aws cloudwatch get-metric-data \
--region us-east-1 \
--start-time 2026-10-06T00:00:00Z \
--end-time 2026-10-13T00:00:00Z \
--metric-data-queries '[
{
"Id": "completed",
"Expression": "SELECT SUM(TransformationExecutionCompleted) FROM \"AWS/TransformCustom\"",
"Period": 86400
}
]'
The dollar figure, from the billing namespace (also  us-east-1  here). This one is a plain  get-metric-statistics  call, because  EstimatedCharges  really is published with exactly these two dimensions:
aws cloudwatch get-metric-statistics \
--namespace AWS/Billing \
--metric-name EstimatedCharges \
--dimensions Name=ServiceName,Value=AWSTransform Name=Currency,Value=USD \
--start-time 2026-10-01T00:00:00Z \
--end-time 2026-10-13T00:00:00Z \
--period 86400 \
--statistics Maximum \
--region us-east-1
 EstimatedCharges  is a running total that resets at the start of each billing month, so take  Maximum  over the period, not  Sum , and keep the period inside a single month. A window that spans a month boundary returns the larger month's figure, not the combined spend.

Attribute, then reconcile

The two moves need different metrics, and that is the point.
To attribute, convert agent minutes to money yourself. Group  AgentExecutionMinutes  by  TransformationName  or  RepositoryName , sum over the period, multiply by the per-agent-minute price from the  AWS Transform custom pricing page . This is the only route to cost per transformation or per repository, because  EstimatedCharges  does not break down that far.
To reconcile, read  EstimatedCharges  with  ServiceName=AWSTransform . This figure matches the bill. Use it to check that your agent-minute arithmetic lines up with what AWS charges, and add  LinkedAccount  when you need per-account totals across an organization.
Attribute with agent minutes. Reconcile with estimated charges. Neither substitutes for the other.

Putting it on a dashboard

A useful dashboard answers three questions, and a few widgets cover them:
  • How much, over time:  AgentExecutionMinutes  summed per day, with  EstimatedCharges  as a reference line on a second y-axis, since one is minutes and the other is dollars.
  • Where it goes:  AgentExecutionMinutes  by  TransformationName , then a second widget by  RepositoryName . These are the cost centers.
  • Whether it worked:  TransformationExecutionStarted  against  TransformationExecutionCompleted , and  AgentExecutionMinutes  by  ExecutionStatus  so wasted minutes stand out.
For a draft-versus-published view, group  TransformationExecutionStarted  by  TransformationVersionType  rather than agent minutes, which do not carry that dimension. Every "by" in this list is a Metrics Insights query, for the reason given in the hands-on section; in the console, that is the Multi source query tab when you add a widget. The low-cardinality rule from the dimensions section applies to every widget here.

Limitations

State these plainly, because they bound what the metrics prove.
The metric and dimension lists here reflect what was emitting when this post was written, confirmed by an  aws cloudwatch list-metrics  scan across all enabled Regions. Two caveats bound that scan.  list-metrics  only returns metrics that received data in the last two weeks, so anything idle for longer is invisible to it. And the scan found more than the original reference documented, which is the point: AWS does not publish an exhaustive catalog for the  AWS/TransformCustom  namespace, and new Transform features add metrics over time. Treat this as a current snapshot, not a closed set, and re-run the scan when you need certainty.
Agent minutes are the billing unit, but the conversion to dollars depends on current pricing. Confirm the per-agent-minute price on the  AWS Transform custom pricing page  rather than hard-coding it into a dashboard.
Billing metrics require billing alerts to be enabled, refresh only a few times a day, and report worldwide totals. They reconcile the bill; they do not monitor a run.

Closing

AWS Transform custom gives you the signals to run modernization as a managed cost instead of a monthly surprise. Agent minutes in  AWS/TransformCustom  say what the platform did and let you attribute spend to a single transformation or repository, and the line-change metrics say what you got for it.  EstimatedCharges  in  AWS/Billing  says what it cost. Hold the two namespaces apart, group by the dimensions that mean something to your team, and the question changes from "why did the bill go up" to "which transformation, on which repository, and was it worth it".
The next step is to turn attribution into a budget, and the AWS Transform CLI already gives you a hard cap on a single run:  atx custom def exec --limit <minutes>  stops the execution when it reaches the agent-minute limit and lets you resume with a higher one, so no one run can surprise you. Combined with the per-transformation and per-repository attribution above, that keeps spend predictable long before the invoice arrives.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article