
Scan every repository for your own patterns with custom analysis in AWS Transform - continuous modernization
Learn how to define your own code analysis as a transformation definition, publish it with the analysis category, and run it across every connected repository on demand or on a schedule with AWS Transform continuous modernization. The walkthrough builds a detector that flags Legacy and EOL Amazon Bedrock models and recommends replacements.
AWS Transform continuous modernization now runs analyses you define. You describe what to look for as a transformation definition and the service runs that analysis across every repository you connect, on demand or on a schedule, and returns findings with severities and recommendations.
The built-in analysis types cover the problems most teams share: outdated dependencies, security issues, readiness for AWS Graviton or AI agents. Think of them as the standard blood panel at your annual checkup. They test for what everyone gets checked, and nobody should skip them. But the standard panel doesn't know your family history: your internal library with a deprecation date, your naming policy, the config flag that must never reach production.
Custom analysis is how you order the extra test.
To show what that looks like, I'll use an example that affects many agentic workloads today: the Bedrock Model Lifecycle Detector . It finds every place your repositories reference an Amazon Bedrock model that is Legacy or End-of-Life (EOL), rates each risk, and suggests the model to move to.
How a custom analysis works
A custom analysis is a transformation definition . It is a folder with a
SKILL.md file and, optionally, a references/ folder. Two things turn it into an analysis:- It reports and does not change code.
SKILL.mdsays what to look for, how to classify each issue, and how to score severity.
- It is published with the
analysiscategory. Continuous modernization only runs definitions published this way as a custom analysis. The transformation definition categories documentation has the details.
The Bedrock detector uses both files.
SKILL.md holds the instructions. references/bedrock-model-lifecycle.md holds a dated snapshot of Legacy and EOL models, the replacement for each, and the list of Active models.The detector reads each reference, looks it up in the snapshot, and assigns a severity:
Severity | Rule |
|---|---|
High | On an active code path and EOL, or Legacy with an EOL date within 90 days |
Medium | On an active code path and Legacy, with an EOL date more than 90 days away |
Low | A configuration option, a test or sample, or documentation |
Every finding, gets a suggested replacement. For example:
Replaceus.anthropic.claude-3-5-sonnet-20241022-v2:0withus.anthropic.claude-sonnet-5-5(Claude Sonnet 5.5, the latest Active model in the Claude Sonnet family, launched 2026-09-28) before 2026-11-13.
The replacement is written in the same form as the original reference, so the fix is a find and replace. Where a newer model is only reachable through an inference profile, the recommendation says so.
Try it
You need the AWS Transform CLI (
atx ), a connected source (the GitHub, GitLab or Bitbucket organization whose repositories you want to analyze), and a way to run remote analyses. The continuous modernization documentation covers installation and setup, and the Remote execution section covers provisioning.Custom analysis can run locally, on AWS Transform-managed infrastructure, on infrastructure in your own account, one-time or on a schedule. For this walkthrough I used AWS Batch in my own account.
Step 1: Get the definition
git clone https://github.com/aws-samples/aws-transform-custom-samples.gitcd aws-transform-custom-samples/community-sourced-transformations/continuous-modernization/analysisStep 2: Publish it as an analysis
A definition can contain only
SKILL.md , references/ , and a few other items, so publish from a staged copy that leaves the README behind:stage=$(mktemp -d)/bedrock-model-lifecycle-detectormkdir -p "$stage"cp -R bedrock-model-lifecycle-detector/SKILL.md \ bedrock-model-lifecycle-detector/references "$stage"/
atx custom def publish -n bedrock-model-lifecycle-detector \ --sd "$stage" \ --category analysis \ --description "Reports Legacy and EOL Amazon Bedrock model references, rates each by lifecycle state and EOL date, and recommends the latest Active model in the same family. Analysis only."
atx custom def listThe
Category column in the list should read analysis .

Figure 1: The published definition, with the analysis category.
Step 3: Connect a source and run it
Open the Continuous modernization dashboard and choose New analysis. Choose Custom, select
bedrock-model-lifecycle-detector , give the analysis a name, and choose the connected source. Run the analysis against one repository first and review the findings before running it across the organization.

Figure 2: Start a custom analysis from the Continuous modernization dashboard.
The analysis detail page updates as the repository moves from pending to in progress and findings begin to arrive.

Figure 3: The custom analysis running against one repository on AWS-managed infrastructure.
Step 4: Read the findings
atx ct findings list --analysis-id <analysis-id> --severity high --jsonEach finding carries the file, the line, the model ID as written in your code, the lifecycle state, the EOL date, the Regions, and the recommendation.

Figure 4: Continuous modernization dashboard with 15 findings from the custom analysis.
Step 5: Put it on a schedule
A scan tells you about the repositories as they are today. Teams keep committing, and a new service can copy a Legacy model ID from an old example next week. Schedule the same analysis to repeat:
atx ct schedule create --name bedrock-lifecycle-weekly --mode batch \ --recurrence weekly:MONDAY --type custom \ --transformation-name bedrock-model-lifecycle-detector --sources <source>Now that reference shows up in Monday's run, not on the day requests start to fail. The snapshot needs care too. It is a point in time, so when AWS announces a new Legacy or EOL model, refresh the snapshot in
references/ , bump the version, and republish.Write your own
The Bedrock detector is one answer to one question. Yours will be different, and the shape is the same. The documentation recommends these sections for
SKILL.md :- Introduction: what the analysis finds, and a statement that it is read-only.
- Entry criteria: when it applies, such as "the repository contains a
pom.xml".
- Scope: what to inspect and what to skip.
- What to report: the patterns that count, one finding per issue, with file and line.
- Categories and severity criteria: a small fixed set, and what makes something high, medium or low.
- Exit criteria: how the agent knows it is done, including what to report when it finds nothing.
Put the facts that change, like the lifecycle table here, in
references/ so you can update them without rewriting the instructions. Then test the definition on a repository where you already know the answer before you publish it.Your turn
Your team probably has a list of things to find: a deprecated internal SDK, a license you can't ship, an API version your platform team retires in March. Today it is written down informally, or not at all.
Pick one item from that list and turn it into a
SKILL.md . Publish it with --category analysis , run it against a single repository, and read the findings.To start, clone the Bedrock Model Lifecycle Detector , run it against one of your repositories, and use it as a template. Then read Custom analysis in the AWS Transform User Guide, and tell me in the comments what you pointed yours at.
About the author
Ritik Khatwani is a Senior Worldwide Specialist Solutions Architect at Amazon Web Services (AWS) based in New York, NY. He helps customers adopt AWS Transform and agentic developer tools to modernize their applications.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article