Using the AWS Transform CLI
AWS Transform custom can be used from your local machine with the AWS Transform CLI. This guide covers the platform-specific setup needed by Modernisation Platform users. For the full AWS Transform custom guide, see the AWS Transform CLI getting started documentation.
Access and permissions
The AWS Transform CLI uses AWS credentials to authenticate. You do not need to use the AWS Transform web application or AWS IAM Identity Center to use the CLI.
The required AWS Transform permissions have been added to the Modernisation Platform developer role. Use temporary credentials for that role, as described in Getting AWS Credentials, and select the account and region where you want to run the transformation.
Prerequisites
You need:
- Node.js 22 or later
- Git
- a working directory that is a Git repository
- an internet connection that can reach the endpoints listed in the AWS Transform network requirements
Install the AWS CLI if it is not already available on your machine. Follow AWS's AWS CLI installation instructions, then configure credentials using Getting AWS Credentials.
Install the AWS Transform CLI
Follow AWS's AWS Transform CLI installation instructions.
On macOS, run:
curl -fsSL https://transform-cli.awsstatic.com/install.sh | bash
Check that the installation succeeded:
atx --version
Configure authentication and region
Configure the AWS credentials for the Modernisation Platform developer role using the AWS credentials instructions. The CLI supports the same AWS profiles and environment variables as the AWS CLI.
Set the region to London, which is the AWS Transform region used by the Modernisation Platform:
export AWS_REGION=eu-west-2
If you use an AWS CLI profile, set it for the current shell instead:
export AWS_PROFILE=<your-profile-name>
Run a transformation
Change to a Git repository containing the code you want to transform and start the CLI:
atx
You can then ask the agent to run a transformation, for example:
Execute the AWS/java-aws-sdk-v1-to-v2 transformation on the codebase at ./my-java-project
For non-interactive execution and the available command options, see the AWS Transform CLI command reference.
Review the changes made by the transformation with standard Git commands, such as git status, git diff, and git log.
Further information
Was this page useful?