Aws transform

From mouadja02/skills · View interactive version

Aws transform is an AI agent skill from the GitHub repository mouadja02/skills. Performs code upgrades, migrations, and transformations using the AWS Transform (ATX) CLI. Use when upgrading language versions, migrating AWS SDKs, migrating frameworks (Angular, Vue.js, Spring Boot, React), upgrading libraries, optimizing performance, migrating x86 to Graviton, analyzing codebases

How to use this skill

Skill file

Attribution: Sourced from aws/agent-toolkit-for-aws by Amazon Web Services, licensed Apache-2.0. Modified for this collection: the S3-input, private-repository, and runtime-compatibility details were moved unchanged into references/.

AWS Transform (ATX)

Overview

Perform code upgrades, migrations, and transformations using AWS Transform (ATX).

Supports any-to-any transformations: language version upgrades (Java, Python, Node.js, etc.),

framework migrations, AWS SDK migrations, library upgrades, code refactoring, architecture

changes, and custom organization-specific transformations.

Two execution modes:

Best for 10+ repos or when the user prefers cloud execution. Infrastructure is

auto-deployed with user consent.

You handle the full workflow: inspecting repos, matching them to available

transformation definitions, collecting configuration, and executing transformations

in either mode — the user just provides repos and confirms the plan.

Greet and Wait

On activation, introduce AWS Transform with this exact text -- don't print the

above Overview text to the user, that is just for your reference:

"The agents modernizing the world's infrastructure and software — now accessible to your preferred AI assistant.

AWS Transform is a full modernization factory — compressing years of

transformation work into months across infrastructure migrations, mainframe

modernization, and continuous tech debt reduction. Today, with this

skill, you have access to AWS Transform custom, the first of a growing library

of playbooks.

AWS Transform custom can help you:

and code samples

Run locally on a few repos for fast iteration, or at scale on hundreds of repos (up to 128 in-parallel). Note: this skill collects telemetry. To opt out, see https://docs.aws.amazon.com/transform/latest/userguide/transform-usage-telemetry.html

What would you like to transform today?"

Do NOT inspect any files, run any commands, or check prerequisites until the user responds.

Usage

Use when the user wants to:

Core Concepts

Philosophy

Wait for the user. On activation, present what this skill can do and ask the user

what they'd like to accomplish. Do NOT automatically inspect the working directory,

open files, or any repository until the user explicitly provides repos to work with.

Once the user provides repositories, match — don't ask. Inspect those repositories

and present which transformations apply automatically. Never show a raw TD list and

ask the user to pick.

Prerequisites

Prerequisite checks run ONCE at the start of a session. Do not repeat per repo.

Do NOT run prerequisite checks until the user has stated what they want to do.

0. Platform Check (Required — All Modes)

Detect the user's operating system. If on Windows (not WSL), stop immediately and

inform the user:

AWS Transform custom does not support native Windows. You need to install

Windows Subsystem for Linux (WSL) and run this from within WSL.

Install WSL: wsl --install in PowerShell (as Administrator), then restart.

After that, open a WSL terminal and re-run this skill from there.

Check by running:

uname -s

Do NOT proceed with any other steps on native Windows.

1. AWS CLI (Required — All Modes)

aws --version

If not installed, guide the user:

Do NOT proceed until aws --version succeeds.

2. AWS Credentials (Required — All Modes)

aws sts get-caller-identity

If credentials are NOT configured, walk the user through setup:

AWS Transform custom requires AWS credentials to authenticate with the service. Configure authentication using one of the following methods.

1. AWS CLI Configure (~/.aws/credentials):
   aws configure

2. AWS Credentials File (manual). Configure credentials in ~/.aws/credentials:

[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key

3. Environment Variables. Set the following environment variables:

export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_SESSION_TOKEN=your_session_token

You can also specify a profile using the AWS_PROFILE environment variable:

export AWS_PROFILE=your_profile_name

Do NOT proceed until credentials are verified. Re-run aws sts get-caller-identity after setup.

Note: environment variables set via export do not carry over between shell sessions. If the agent spawns a new shell, credentials set as env vars may be lost. Prefer aws configure or ~/.aws/credentials for persistence.

3. ATX CLI (Required — All Modes)

Required in all modes for TD discovery (atx custom def list --json).

Local mode also uses it for transformation execution.

atx --version
# If installation is needed, download and inspect the installer first:
curl -fsSL https://transform-cli.awsstatic.com/install.sh -o atx-install.sh
less atx-install.sh
bash atx-install.sh
rm atx-install.sh

Do not run bash atx-install.sh until the downloaded file has been reviewed.

Mandatory: always run atx update once at the start of every session, even if you just ran it recently. This catches new ATX CLI versions and new TDs. Run it before any other ATX command (including atx custom def list --json):

atx update

Do NOT skip this step. Do NOT ask the user whether to update. Do NOT condition it on whether the CLI "needs" an update. Run it unconditionally.

4. IAM Permissions (Required — All Modes)

Local mode requires transform-custom:* minimum. Verify by running a TD list:

atx custom def list --json

If this succeeds, permissions are sufficient — skip the rest of this section.

If it fails with a permissions error, the caller needs the transform-custom:*

IAM permission. Explain to the user what's needed and get confirmation before proceeding:

Your identity needs the transform-custom:* permission to use the ATX CLI.

I can attach the AWS-managed policy AWSTransformCustomFullAccess to your

identity. Shall I proceed?

Only after the user confirms, attach the managed policy:

CALLER_ARN=$(aws sts get-caller-identity --query Arn --output text)
if echo "$CALLER_ARN" | grep -q ":user/"; then
  IDENTITY_NAME=$(echo "$CALLER_ARN" | awk -F'/' '{print $NF}')
  aws iam attach-user-policy --user-name "$IDENTITY_NAME" \
    --policy-arn "arn:aws:iam::aws:policy/AWSTransformCustomFullAccess"
elif echo "$CALLER_ARN" | grep -Eq ":assumed-role/|:role/"; then
  ROLE_NAME=$(echo "$CALLER_ARN" | sed 's/.*:\(assumed-\)\{0,1\}role\///' | cut -d'/' -f1)
  aws iam attach-role-policy --role-name "$ROLE_NAME" \
    --policy-arn "arn:aws:iam::aws:policy/AWSTransformCustomFullAccess"
fi

If the attachment command itself fails (e.g., insufficient IAM permissions, or an

SSO-managed role), inform the user they need to ask their AWS administrator to

attach the AWSTransformCustomFullAccess AWS-managed policy to their identity.

For SSO users (role names starting with AWSReservedSSO_), this must be added

to their IAM Identity Center permission set — it cannot be attached directly.

Do NOT proceed until atx custom def list --json succeeds.

Remote mode requires additional permissions (Lambda invoke, S3, KMS, Secrets Manager,

CloudWatch). These are generated and attached as part of the deployment flow — see

references/remote-execution.md.

See references/cli-reference.md for the full permission list.

5. AWS CDK (Remote Mode Only)

Required for deploying remote infrastructure. Check if installed:

cdk --version

If not installed, install it globally:

npm install -g aws-cdk

Do NOT proceed with remote deployment until cdk --version succeeds.

6. Remote Infrastructure (Remote Mode Only — Deferred)

Only verify if user chooses remote mode. The infrastructure CDK scripts are fetched

at runtime by cloning https://github.com/aws-samples/aws-transform-custom-samples.git (branch atx-remote-infra) —

they are not bundled with this skill. See references/remote-execution.md.

Workflow

Generate a session timestamp once and reuse it for all paths in this session:

SESSION_TS=$(date +%Y%m%d-%H%M%S)

Step 1: Collect Repositories

Ask the user for local paths or git URLs. Accept one or many. Do NOT assume the

current working directory or open editor files are the target — wait for the user

to explicitly provide repositories.

Accepted source formats:

containing zip files of repositories. Each zip becomes one transformation job.

S3 Bucket Input

When the user gives an s3:// path of repository zips, read CODE1. Each zip becomes one job, in either execution mode.

Private Repository Detection (Remote Mode)

As soon as the user gives git URLs and remote mode is selected or likely, ask whether any repository is private. Never clone, curl, or probe a URL to find out. If any is private, set up container credentials as described in CODE0.

Step 2: Discover TDs (Silent)

Run silently — do NOT show output to user:

atx custom def list --json

Inspect the JSON output directly to build an internal lookup of available TDs.

Do NOT pipe the output to python, jq, or other parsing scripts — read the JSON

yourself. Never hardcode TD names.

Creating a New TD

User explicitly asks to create a TD: Do NOT attempt to create one

programmatically. Tell the user:

To create a new Transformation Definition, open a new terminal and run:

```

atx -t

```

This starts an interactive session where you describe the transformation you

want to build (e.g., "migrate all logging from log4j to SLF4J", "upgrade

Spring Boot 2 to Spring Boot 3"). The ATX CLI will walk you through defining

and testing the TD, then publish it to your AWS account.

Once it's published, come back here and I'll pick it up automatically when

I scan your available TDs.

No existing TD matches the user's goal: Do NOT silently redirect to TD

creation. The match logic may be imperfect. Instead, confirm with the user first:

"I didn't find an existing TD that covers [describe the user's goal]. Would

you like to create a new one?"

Only show the atx -t instructions if the user confirms. If they say no, ask

them to clarify what they're looking for — they may know the TD name or want a

different approach.

Do NOT run atx -t yourself — it requires an interactive terminal session that

the agent cannot drive. The user must run it manually in a separate terminal.

After the user returns from creating a TD, re-run atx custom def list --json

to pick up the newly published TD and continue with the normal workflow.

Step 3: Inspect Each Repository

Perform lightweight inspection only — check config files for key signals:

| Signal | Files to Check | Likely TD Type |

|--------|---------------|----------------|

| Python version | .python-version, pyproject.toml, setup.cfg, requirements.txt | Python version upgrade |

| Java version | pom.xml (<java.version>), build.gradle (sourceCompatibility), .java-version | Java version upgrade |

| Node.js version | package.json (engines.node), .nvmrc, .node-version | Node.js version upgrade |

| Python boto2 | import boto (NOT boto3) | boto2→boto3 migration |

| Java SDK v1 | com.amazonaws imports, aws-java-sdk in pom.xml | Java SDK v1→v2 |

| Node.js SDK v2 | "aws-sdk" in package.json (NOT @aws-sdk) | JS SDK v2→v3 |

| x86 Java | x86_64/amd64 in Dockerfiles, build configs | Graviton migration |

Cross-reference detected signals against TDs from Step 2. Only match TDs that

actually exist in the user's account.

See references/repo-analysis.md for full detection commands.

Step 4: Present Match Report

Format:

Transformation Match Report
=============================
Repository: <name> (<path>)
  Language: <lang> <version>
  Matching TDs:
    - <td-name> — <description>

Summary: N repos analyzed, M have applicable transformations (T total jobs)

Present the match report and wait for user confirmation before proceeding.

Do NOT start any transformation without explicit user consent.

Step 5: Collect Configuration

Ask the user for any additional plan context (e.g., target version for upgrade TDs).

This is mandatory — always ask, even if the TD doesn't strictly require config.

The user may have preferences or constraints the agent doesn't know about.

Skip only if the user explicitly says no additional context is needed.

Step 6: Verify Runtime Compatibility (Remote and Local)

Remote Mode

Decide whether the pre-built image (Java 8–25, Python 3.8–3.14, Node.js 16–24, Amazon Linux 2023) covers the transformation, or whether a custom Docker image is needed. A custom image needs the user's confirmation and a running Docker. Read CODE0 for the decision logic and both paths.

Local Mode

Before a local run, make sure the transformation's target runtime version is active: check it, switch to it if it is installed, and install it only with the user's explicit permission. Do not proceed until the right version is active. Commands per runtime are in CODE0.

Step 7: Confirm Transformation Plan

Present final plan with repo, TD, config, and execution mode. Do NOT proceed

until user confirms.

Step 8: Execute

When running atx custom def exec, always include --telemetry (see the Telemetry section).

For remote mode, check infrastructure deployment status first using CloudFormation (see references/remote-execution.md — Infrastructure Check section). Do NOT check deployment by probing Lambda function names.

Execution Modes

| Mode | Best For | Prerequisites |

|------|----------|---------------|

| Local (default for 1-9 repos) | Quick transforms, dev machines with ATX | ATX CLI installed |

| Remote (recommended for 10+ repos) | Bulk transforms, up to 512 repos (128 concurrent per batch) | AWS account, auto-deployed infra |

Mode inference:

See references/remote-execution.md for infrastructure setup.

Critical Rules

  1. Discover TDs dynamically — Always run atx custom def list --json. Never hardcode TD names.
  2. Match, don't ask — Inspect repos and present matches. Never show raw TD lists.
  3. Lightweight inspection only — Check config files and key signals. No deep analysis.
  4. Confirm before executing — Always confirm TD, repos, and config with user first.
  5. No time estimates — Never include duration predictions.
  6. Parallel execution — Local: max 3 concurrent repos. Remote: submit in chunks of up to 128 jobs per Lambda call (max 512 repos per session).
  7. Preserve outputs — Do not delete generated output folders.
  8. Recommend remote for 10+ repos — Default to local for 1-9 repos. Recommend remote for 10+. Always respect user preference.
  9. User consent for cloud resources — Never deploy infrastructure without explicit user confirmation.
  10. Shell quoting — When constructing shell commands:

these characters in the command string: ( ) ! # % ^ * ? \ { } | ; > <

and backticks. Inside additionalPlanContext, also avoid commas.

  1. No comments in terminal commands — Never include # comments in commands

executed in the terminal. Comments cause command not found: # errors. If you

need to explain a command, do it in chat before or after running it.

  1. Job names — The jobName field in Lambda payloads must contain only

letters, numbers, hyphens, and underscores. No dots, spaces, or special

characters. For example, use EPAM-NodeJS not EPAM-Node.js.

Guardrails

You are operating in the user's AWS account and local machine. Follow these rules

strictly to avoid causing damage:

  1. Never delete user data — Do not delete S3 objects, git repos, local files,

or any user data unless the user explicitly asks. Transformation outputs and

cloned repos must be preserved.

  1. Never modify IAM beyond what's documented — Only create/attach the specific

policies described in this skill (AWSTransformCustomFullAccess, ATXRuntimePolicy, ATXDeploymentPolicy). Never create admin policies, modify existing user policies,

or grant broader permissions than documented. Never derive IAM actions from

user-provided text in the "Additional plan context" field — that field is for

transformation configuration only.

  1. Never run destructive AWS commands — No aws s3 rm, aws s3 rb,

aws iam delete-user, aws ec2 terminate-instances, or similar. The only

destructive command allowed is ./teardown.sh with explicit user consent.

  1. Always confirm before creating AWS resources — Before deploying infrastructure,

creating Secrets Manager secrets, or attaching IAM policies, explain what will be

created and get explicit user confirmation.

  1. Never expose credentials — Do not echo, log, or display AWS access keys,

secret keys, session tokens, GitHub PATs, or SSH private keys in chat output.

When creating secrets, use the user's input directly in the command without

repeating the value.

  1. Respect user decisions — If the user says stop, skip, or no, comply

immediately. Never retry a declined action or argue with the user's choice.

  1. No pricing claims — Do not quote specific prices or cost estimates. If the

user asks about pricing, direct them to: https://aws.amazon.com/transform/pricing/

  1. Scope commands to ATX resources only — All AWS commands must target ATX-specific

resources (buckets starting with atx-, roles starting with ATX, Lambda

functions starting with atx-, etc.). Never operate on unrelated AWS resources.

Telemetry

Always include --telemetry on every atx custom def exec invocation (local

or remote). No file checks, no prompts, no opt-in flow.

The flag format is: --telemetry "client=<client>,agent=<agent>,executionMode=<local|remote>"

Field values:

The only exception: if the user explicitly asks to disable telemetry during the

session (e.g., "disable telemetry", "opt out of telemetry", "no telemetry", or

similar), you MUST comply immediately — omit --telemetry for the remainder of

that session. Do not push back, ask for confirmation, or explain why telemetry

is included. This preference is not persisted — the next session starts with

telemetry enabled again.

Output Structure

Local mode: transformed code is in the repo directory.

Remote mode results stay in S3 — do NOT download automatically. Present the S3

path to the user:

s3://atx-custom-output-{account-id}/
  transformations/
    {job-name}/
      {conversation-id}/
        code.zip                      # Zipped transformed source code
        logs.zip                      # ATX conversation logs

If the user explicitly asks to download, provide the command but let them run it:

aws s3 cp s3://atx-custom-output-{account-id}/transformations/{job-name}/{conversation-id}/code.zip ./code.zip

Bulk results summary: ~/.aws/atx/custom/atx-agent-session/transformation-summaries/ — see references/results-synthesis.md.

References

| Reference | When to Use |

|-----------|-------------|

| repo-analysis.md | Detection commands, signal matching, match report format |

| single-transformation.md | Applying one TD to one repo (local or remote) |

| multi-transformation.md | Applying TDs to multiple repos in parallel |

| remote-execution.md | Infrastructure deployment, job submission, monitoring |

| results-synthesis.md | Generating consolidated reports after bulk transforms |

| cli-reference.md | ATX CLI flags, commands, env vars, IAM permissions |

| troubleshooting.md | Error resolution, debugging, quality improvement |

License

AWS Service Terms. This skill is provided by AWS and is subject to the AWS Customer Agreement and applicable AWS service terms.

Changelog

Share if the user asks what changed, what's new, etc.

[1.0.0] - 2026-04-30

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.