Command-line tool to lint and modify bash scripts that use AWS CLI v1 to prevent breakage from changes introduced in AWS CLI v2.
Project description
AWS CLI v1-to-v2 Migration Tool
A command-line tool that lints bash scripts for AWS CLI v1 usage and updates them to avoid breaking changes introduced in AWS CLI v2. Not all breaking changes can be detected statically, thus not all of them are supported by this tool.
For a full list of the breaking changes introduced with AWS CLI v2, see Breaking changes between AWS CLI version 1 and AWS CLI version 2.
Jump to:
- Installation
- Usage
- Supported Breaking Changes
- Backwards Compatibility Policy
- Contributing
- Getting Help
Installation
Most users should install AWS CLI v1-to-v2 Migration Tool via pip in a virtualenv:
$ python3 -m pip install aws-cli-migrate
or, if you are not installing in a virtualenv, to install globally:
$ sudo python3 -m pip install aws-cli-migrate
or for your user:
$ python3 -m pip install --user aws-cli-migrate
If you have the aws-cli-migrate package installed and want to upgrade to the latest version, you can run:
$ python3 -m pip install --upgrade aws-cli-migrate
This will install the aws-cli-migrate package as well as all dependencies.
Usage
Dry-run mode (default)
Display issues without modifying the script:
migrate-aws-cli --script upload_s3_files.sh
Auto-fix mode
Automatically update the input script:
migrate-aws-cli --script upload_s3_files.sh --fix
Optionally, supply an output path to write the updated script, rather than updating the input bash script:
migrate-aws-cli --script upload_s3_files.sh --output upload_s3_files_v2.sh --fix
Interactive mode
Review and accept/reject each change individually:
migrate-aws-cli --script upload_s3_files.sh --interactive --output upload_s3_files_v2.sh
In interactive mode, you can:
- Press
yto accept the current change - Press
nto skip the current change - Press
ato accept all findings with the current type - Press
rto reject all findings with the current type - Press
uto accept all remaining changes - Press
sto save and exit - Press
qto quit without saving
Supported Breaking Changes
The AWS CLI v1-to-v2 Migration Tool lints bash scripts for usage of AWS CLI v1 commands that are likely to face breaking changes after upgrading to AWS CLI v2. Additionally, the migration tool can automatically modify bash scripts to prevent breakage caused by breaking changes that would be caused by upgrading to AWS CLI v2.
Using the migration tool does not guarantee that all breaking changes will be fully prevented. We recommend that users upgrading from AWS CLI v1 to AWS CLI v2 read Breaking changes between AWS CLI version 1 and AWS CLI version 2 in New features and changes in the AWS CLI version 2.
The table below describes which breaking changes the migration tool can detect or automatically fix.
Backwards Compatibility Policy
The AWS CLI v1-to-v2 Migration Tool does not guarantee backwards compatibility. In particular, this tool may face breaking changes in any future versions.
See CHANGELOG.md for details on the changes introduced in each update of the AWS CLI v1-to-v2 Migration Tool.
Contributing
If you'd like to contribute to the project, please see our Contributing Guide for development setup instructions and guidelines.
Getting Help
The best way to interact with our team is through GitHub. You can open an issue and choose the templates for the AWS CLI v1-to-v2 Migration Tool.
If you have a support plan with AWS Support, you can also create a new support case.
Please check for open similar issues before opening another one.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_cli_migrate-1.0.0.tar.gz.
File metadata
- Download URL: aws_cli_migrate-1.0.0.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60143f017d7c19c2402e4cabcdd92e51b3ef9e4c8fa4966638dcdbe80b82a9ac
|
|
| MD5 |
984f42987dc1cc52e5b2d0c069fe2962
|
|
| BLAKE2b-256 |
b2eb1e075a8fc2b9f840aaec486533a94c48250c4133b2a5aeaad285e00d3218
|
File details
Details for the file aws_cli_migrate-1.0.0-py3-none-any.whl.
File metadata
- Download URL: aws_cli_migrate-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fb27533406f03b35171f2671b3fc0125349dcac04cce2339808aedb5cad20b4
|
|
| MD5 |
2b09367e5b939037e7f951117c1f61ed
|
|
| BLAKE2b-256 |
8a4a375cd0014031ef7accae07bf475e614de0c5efba89cac51d6cfe0bbff520
|