

# Migration guide for the AWS CLI version 2
Migration guide

This section contains instructions for updating the AWS CLI version 1 to AWS CLI version 2. The AWS CLI version 2 builds on AWS CLI version 1 and includes features and enhancements based on community feedback. The AWS CLI version 2 is the most recent major version of the AWS CLI and supports all of the latest features. Some features that were introduced in version 2 are not backported to version 1 and you must upgrade to access those features. 

To prevent unexpected issues, before you migrate to version 2, [learn about the differences between the versions](cliv2-migration-changes.md). The AWS CLI version 2 includes new features and changes that might require you to update your scripts or commands for backwards compatibility.

AWS CLI versions 1 and 2 use the same `aws` command name. If you have both versions installed, your computer uses the first one found in your search path. This could result in your `aws` command name calling your old AWS CLI version, even when you have the new one installed.

To update to the AWS CLI version 2, follow one of the below instructions:
+ If you previously installed AWS CLI version 1, follow the instructions in [Installing AWS CLI version 2 from AWS CLI version 1](cliv2-migration-instructions.md).
+ If you have not previously installed AWS CLI version 1, follow the instructions in [Getting started with the AWS CLI](cli-chap-getting-started.md). 

## Using AWS CLI Migration Tools to Mitigate Breakage


There are changes in behavior between AWS CLI version 1 and AWS CLI version 2 that might require you to update your scripts or commands. Upgrading to AWS CLI version 2 without verifying that your existing scripts are safely migrated risks encountering unexpected effects when running the scripts with AWS CLI version 2, such as making unintended changes to the resources on your AWS accounts.

There are two AWS-owned tools that you can use to guide your migration. Regardless of which tool you use, we recommend that you reference [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) in the [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md) guide.

### Upgrade Debug Mode


Upgrade debug mode is a feature in AWS CLI version 1 that is available in versions `1.44.0` and higher. When this feature is enabled, each AWS CLI command that you execute is checked to determine if it is likely to have different behavior in AWS CLI version 2, assuming the execution environment stays the same. If an executed command would have different behavior in AWS CLI version 2, a warning will be shown alongside the command output with suggested actions that can be taken to preserve AWS CLI version 1 behavior in AWS CLI version 2.

The main reason to use upgrade debug mode to guide your migration is that it has high coverage for detecting whether commands will face a change of behavior. 14 out of the 15 breaking changes described in [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) can be detected with upgrade debug mode—see [Limitations](cli-upgrade-debug-mode.md#upgrade-mode-limitations) in [Using upgrade debug mode to upgrade AWS CLI version 1 to AWS CLI version 2](cli-upgrade-debug-mode.md) for the limitations of this feature. On the other hand, the main downside of using upgrade debug mode is that its output is only relevant within its execution environment; if any AWS CLI configuration settings change in the environment after migrating to AWS CLI version 2, breaking changes may still occur, and you should re-verify using upgrade debug mode in the updated environment.

### AWS CLI v1-to-v2 Migration Tool


The AWS CLI v1-to-v2 Migration Tool is a standalone tool that can be used with Python 3.9 and higher. This tool is a static linter that runs independently of the AWS CLI. It lints bash scripts containing AWS CLI version 1 commands that may have different behavior in AWS CLI version 2. For most commands that it detects as likely to have different behavior in AWS CLI version 2, it can automatically update the command within the script to preserve AWS CLI version 1 behavior in AWS CLI version 2.

The main reason to use the AWS CLI v1-to-v2 Migration Tool to guide your migration is that it can automatically update your scripts to preserve AWS CLI version 1 behavior in AWS CLI version 2, saving you time and effort in making the updates yourself. On the other hand, the main downside to using the migration tool is that it has lower coverage for detecting whether commands will face a change of behavior. Being a static tool, it does not check for changes in behavior that is determined at runtime.

## Choosing Between Upgrade Debug Mode and AWS CLI v1-to-v2 Migration Tool


The following table highlights the main differences between upgrade debug mode and the AWS CLI v1-to-v2 Migration Tool, and can be used to help guide you to choosing the right tool for your use case.


| Upgrade debug mode | AWS CLI v1-to-v2 Migration Tool | 
| --- | --- | 
| Detects 14 out of the 15 breaking changes between AWS CLI version 1 and AWS CLI version 2. | Detects 7 out of the 15 breaking changes between AWS CLI version 1 and AWS CLI version 2. | 
| Compatible with any terminal program that can run the AWS CLI. | Only supports linting bash scripts. | 
| Requires AWS CLI version 1, version 1.44.0 or higher. | Runs independently of the AWS CLI; it does not require the AWS CLI to be installed. | 
| Manual fixes must be made to preserve AWS CLI version 1 behavior in AWS CLI version 2. | Automatically fixes most AWS CLI version 1 commands that it detects as likely to have different behavior in AWS CLI version 2. | 
| Detections and suggested fixes are only relevant to the execution environment (i.e. AWS CLI configuration) that it is executed in. | Detections and suggested fixes are independent of the environment. | 
| Requires executing each AWS CLI command under test for change of behavior. | Does not require executing any AWS CLI commands. Only needs to be executed once per bash script. | 
| Has exactly 5 known cases where it will output false positive detections. | Has exactly 3 known cases where it will output false positive detections. | 

The following table shows which of the [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) are supported in each of the two migration tools.


| Breaking change | Detected by upgrade debug mode | Detected by AWS CLI v1-to-v2 Migration Tool | 
| --- | --- | --- | 
| [Environment variable added to set text file encoding](cliv2-migration-changes.md#cliv2-migration-encodingenvvar) | Yes | No | 
| [Binary parameters are passed as base64-encoded strings by default](cliv2-migration-changes.md#cliv2-migration-binaryparam) | Yes | Yes | 
| [Improved Amazon S3 handling of file properties and tags for multipart copies](cliv2-migration-changes.md#cliv2-migration-s3-copy-metadata) | Yes | Yes | 
| [No automatic retrieval of `http://` or `https://` URLs for parameters](cliv2-migration-changes.md#cliv2-migration-paramfile) | Yes | No | 
| [Pager used for all output by default](cliv2-migration-changes.md#cliv2-migration-output-pager) | Yes | Yes | 
| [Timestamp output values are standardized to ISO 8601 format](cliv2-migration-changes.md#cliv2-migration-timestamp) | Yes | No | 
| [Improved handling of CloudFormation deployments that result in no changes](cliv2-migration-changes.md#cliv2-migration-cfn) | Yes | Yes | 
| [Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region](cliv2-migration-changes.md#cliv2-migration-s3-regional-endpoint) | Yes | No | 
| [Changed default behavior for Regional AWS STS endpoints](cliv2-migration-changes.md#cliv2-migration-sts-regional-endpoint) | Yes | No | 
| [`ecr get-login` removed and replaced with `ecr get-login-password`](cliv2-migration-changes.md#cliv2-migration-ecr-get-login) | Yes | Yes | 
| [AWS CLI version 2 support for plugins is changing](cliv2-migration-changes.md#cliv2-migration-profile-plugins) | Yes | No | 
| [Hidden alias support removed](cliv2-migration-changes.md#cliv2-migration-aliases) | Yes | Yes | 
| [The `api_versions` configuration file setting is not supported](cliv2-migration-changes.md#cliv2-migration-api-versions) | Yes | No | 
| [AWS CLI version 2 uses only Signature v4 to authenticate Amazon S3 requests](cliv2-migration-changes.md#cliv2-migration-sigv4) | Yes | No | 
| [AWS CLI version 2 is more consistent with paging parameters](cliv2-migration-changes.md#cliv2-migration-skeleton-paging) | Yes | Yes | 
| [AWS CLI version 2 provides more consistent return codes across all commands](cliv2-migration-changes.md#cliv2-migration-return-codes) | No | No | 

## Additional topics in this section

+ [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md)
+ [Installing AWS CLI version 2 from AWS CLI version 1](cliv2-migration-instructions.md)
+ [Using upgrade debug mode to upgrade AWS CLI version 1 to AWS CLI version 2](cli-upgrade-debug-mode.md)
+ [Using AWS CLI v1-to-v2 Migration Tool to upgrade AWS CLI version 1 to AWS CLI version 2](cli-migration-tool.md)

# New features and changes in the AWS CLI version 2
New features and changes

This topic describes new features and changes in behavior between AWS CLI version 1 and AWS CLI version 2. These changes might require you to update your scripts or commands to get the same behavior in version 2 as you did in version 1.

**Topics**
+ [

## AWS CLI version 2 new features
](#cliv2-migration-changes-features)
+ [

## Breaking changes between AWS CLI version 1 and AWS CLI version 2
](#cliv2-migration-changes-breaking)

## AWS CLI version 2 new features


The AWS CLI version 2 is the most recent major version of the AWS CLI and supports all of the latest features. Some features introduced in version 2 are not backported to version 1 and you must upgrade to access those features. These features include the following:

**Python interpreter not needed**  
The AWS CLI version 2 doesn't need a separate install of Python. It includes an embedded version.

**[Wizards](cli-usage-wizard.md)**  
You can use a wizard with the AWS CLI version 2. The wizard guides you through constructing certain commands.

**[IAM Identity Center authenticationIAM Identity Center conceptsTutorial: AWS IAM Identity Center and Amazon S3AWS CLI examples](cli-configure-sso.md)**  
If your organization uses AWS IAM Identity Center (IAM Identity Center), your users can sign in to Active Directory, a built-in IAM Identity Center directory, or [another IdP connected to IAM Identity Center](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-identity-source-idp.html). Then, they are mapped to an AWS Identity and Access Management (IAM) role that allows you to run AWS CLI commands.

**[Auto-prompt](cli-usage-parameters-prompting.md)**  
When enabled, the AWS CLI version 2 can prompt you for commands, parameters, and resources when you run an `aws` command. 

**[Running the official Amazon ECR Public or Docker images for the AWS CLI](getting-started-docker.md)**  
The official Docker image for the AWS CLI provides isolation, portability, and security that AWS directly supports and maintains. This way, you can use the AWS CLI version 2 in a container-based environment without having to manage the installation yourself. 

**[Client-side pager](cli-usage-pagination.md#cli-usage-pagination-clientside)**  
The AWS CLI version 2 provides the use of a client-side pager program for output. By default, this feature is turned on and returns all output through your operating system’s default pager program.

**[`aws configure import`](cli-configure-files.md#cli-config-aws_configure_import)**  
Import `.csv` credentials generated from the AWS Management Console. A `.csv` file is imported with the profile name matching the IAM user name. 

**[https://docs.aws.amazon.com/cli/latest/reference/configure/list-profiles.html](https://docs.aws.amazon.com/cli/latest/reference/configure/list-profiles.html)**  
Lists the names of all profiles you have configured. 

**[YAML stream output format](cli-usage-output-format.md#yaml-stream-output)**  
The `yaml` and `yaml-stream` format takes advantage of the [YAML](https://yaml.org) format while providing more responsive viewing of large datasets by streaming the data to you. You can start viewing and using YAML data before the entire query downloads. 

**[New high-level `ddb` commands for DynamoDB](https://docs.aws.amazon.com/cli/latest/reference/ddb/index.html)**  
The AWS CLI version 2 has the high-level Amazon DynamoDB commands [https://docs.aws.amazon.com/cli/latest/reference/api/latest/reference/ddb/put.html](https://docs.aws.amazon.com/cli/latest/reference/api/latest/reference/ddb/put.html) and [https://docs.aws.amazon.com/cli/latest/reference/api/latest/reference/ddb/select.html](https://docs.aws.amazon.com/cli/latest/reference/api/latest/reference/ddb/select.html). These commands provide a simplified interface for putting items in DynamoDB tables and searching in a DynamoDB table or index. 

**[https://docs.aws.amazon.com/cli/latest/reference/logs/tail.html](https://docs.aws.amazon.com/cli/latest/reference/logs/tail.html)**  
The AWS CLI version 2 has a custom `aws logs tail` command that tails the logs for an Amazon CloudWatch Logs group. By default, the command returns logs from all associated CloudWatch Logs streams during the past ten minutes.

**[Added metadata support for high-level `s3` commands](cli-services-s3-commands.md#using-s3-commands-before-large)**  
The AWS CLI version 2 adds the `--copy-props` parameter to the high-level `s3` commands. With this parameter, you can configure additional metadata and tags for Amazon Simple Storage Service (Amazon S3).

**[`AWS_REGION`](cli-configure-envvars.md#envvars-list-AWS_REGION)**  
The AWS CLI version 2 has an AWS SDK-compatible environment variable called `AWS_REGION`. This variable specifies the AWS Region to send requests to. It overrides the `AWS_DEFAULT_REGION` environment variable, which is only applicable in the AWS CLI.

## Breaking changes between AWS CLI version 1 and AWS CLI version 2


This sections describes all of the changes in behavior between AWS CLI version 1 and AWS CLI version 2. These changes might require you to update your scripts or commands to get the same behavior in version 2 as you did in version 1.

**Topics**
+ [

### Environment variable added to set text file encoding
](#cliv2-migration-encodingenvvar)
+ [

### Binary parameters are passed as base64-encoded strings by default
](#cliv2-migration-binaryparam)
+ [

### Improved Amazon S3 handling of file properties and tags for multipart copies
](#cliv2-migration-s3-copy-metadata)
+ [

### No automatic retrieval of `http://` or `https://` URLs for parameters
](#cliv2-migration-paramfile)
+ [

### Pager used for all output by default
](#cliv2-migration-output-pager)
+ [

### Timestamp output values are standardized to ISO 8601 format
](#cliv2-migration-timestamp)
+ [

### Improved handling of CloudFormation deployments that result in no changes
](#cliv2-migration-cfn)
+ [

### Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region
](#cliv2-migration-s3-regional-endpoint)
+ [

### Changed default behavior for Regional AWS STS endpoints
](#cliv2-migration-sts-regional-endpoint)
+ [

### `ecr get-login` removed and replaced with `ecr get-login-password`
](#cliv2-migration-ecr-get-login)
+ [

### AWS CLI version 2 support for plugins is changing
](#cliv2-migration-profile-plugins)
+ [

### Hidden alias support removed
](#cliv2-migration-aliases)
+ [

### The `api_versions` configuration file setting is not supported
](#cliv2-migration-api-versions)
+ [

### AWS CLI version 2 uses only Signature v4 to authenticate Amazon S3 requests
](#cliv2-migration-sigv4)
+ [

### AWS CLI version 2 is more consistent with paging parameters
](#cliv2-migration-skeleton-paging)
+ [

### AWS CLI version 2 provides more consistent return codes across all commands
](#cliv2-migration-return-codes)

### Environment variable added to set text file encoding
File encoding environment variable

 By default, text files for [Blob](cli-usage-parameters-types.md#parameter-type-blob) use the same encoding as the installed locale. Because the AWS CLI version 2 uses an embedded version of Python, the `PYTHONUTF8` and `PYTHONIOENCODING` environment variables are not supported. To set encoding for text files to be different from the locale, use the `AWS_CLI_FILE_ENCODING` environment variable. The following example sets the AWS CLI to open text files using `UTF-8` on Windows.

```
AWS_CLI_FILE_ENCODING=UTF-8
```

For more information, see [Configuring environment variables for the AWS CLI](cli-configure-envvars.md) .

### Binary parameters are passed as base64-encoded strings by default
Passing binary parameters

In the AWS CLI, some commands required [base64](https://wikipedia.org/wiki/Base64)-encoded strings, while others required UTF-8-encoded byte strings. In the AWS CLI version 1, passing data between two encoded string types often required some intermediate processing. The AWS CLI version 2 makes handling binary parameters more consistent, which helps pass values from one command to another more reliably. 

By default, the AWS CLI version 2 passes all binary input and binary output parameters as the base64-encoded string `blobs` (binary large object). For more information, see [Blob](cli-usage-parameters-types.md#parameter-type-blob).

To revert to the AWS CLI version 1 behavior, use the `cli\$1binary\$1format` file configuration or the `--cli-binary-format` parameter.

### Improved Amazon S3 handling of file properties and tags for multipart copies
Improved Amazon S3 property and tag handling during `s3 copy` operations

When you use the AWS CLI version 1 commands in the `aws s3` namespace to copy a file from one S3 bucket location to another, and that operation uses [multipart copy](https://docs.aws.amazon.com/AmazonS3/latest/userguide/CopyingObjctsMPUapi.html), no file properties from the source object are copied to the destination object.

By default, the corresponding commands in the AWS CLI version 2 transfer all tags and some of the properties from the source to the destination copy. Compared to the AWS CLI version 1, this can result in more AWS API calls being made to the Amazon S3 endpoint. To change the default behavior for `s3` commands in AWS CLI version 2 , use the `--copy-props` parameter.

For more information, see [File properties and tags in multipart copies](cli-services-s3-commands.md#using-s3-commands-before-tags).

### No automatic retrieval of `http://` or `https://` URLs for parameters
No automatic retrieval of webpages for parameters

The AWS CLI version 2 does not perform a `GET` operation when a parameter value begins with `http://` or `https://`, and does not use the returned content as the parameter value. As a result, the associated command line option `cli_follow_urlparam` is removed from the AWS CLI version 2.

If you need to retrieve a URL and pass the URL contents into a parameter value, we recommend that you use `curl` or a similar tool to download the contents of the URL to a local file. Then, use the `file://` syntax to read the contents of that file and use it as the parameter value. 

For example, the following command no longer tries to retrieve the contents of the page found at `http://www.example.com` and pass those contents as the parameter. Instead, it passes the literal text string `https://example.com` as the parameter.

```
$ aws ssm put-parameter \
    --value http://www.example.com \
    --name prod.microservice1.db.secret \
    --type String 2
```

If you need to retrieve and use the contents of a web URL as a parameter, you can do the following in version 2.

```
$ curl https://my.example.com/mypolicyfile.json -o mypolicyfile.json
$ aws iam put-role-policy \
    --policy-document file://./mypolicyfile.json \
    --role-name MyRole \
    --policy-name MyReadOnlyPolicy
```

In the preceding example, the `-o` parameter tells `curl` to save the file in the current folder with the same name as the source file. The second command retrieves the content of that downloaded file and passes the content as the value of `--policy-document`.

### Pager used for all output by default
Output paging

By default, the AWS CLI version 2 returns all output through your operating system’s default pager program. This program is the [https://ss64.com/bash/less.html](https://ss64.com/bash/less.html) program on Linux or macOS, and the [https://docs.microsoft.com/windows-server/administration/windows-commands/more](https://docs.microsoft.com/windows-server/administration/windows-commands/more) program on Windows. This can help you navigate a large amount of output from a service by displaying that output one page at a time. 

You can configure the AWS CLI version 2 to use a different paging program or none at all. For more information, see [Client-side pager](cli-usage-pagination.md#cli-usage-pagination-clientside).

### Timestamp output values are standardized to ISO 8601 format
All date and time values in ISO 8601 format

By default, the AWS CLI version 2 returns all timestamp response values in the [ISO 8601 format](https://wikipedia.org/wiki/ISO_8601). In AWS CLI version 1, commands returned timestamp values in whatever format was returned by the HTTP API response, which could vary from service to service. 

To see timestamps in the format returned by the HTTP API response, use the `wire` value in your `config` file. For more information, see `cli\$1timestamp\$1format`.

### Improved handling of CloudFormation deployments that result in no changes
Improved CloudFormation deployment handling

By default in the AWS CLI version 1, if you deploy a CloudFormation template that results in no changes, the AWS CLI returns a failed error code. This causes problems if you don't consider that to be an error and you want your script to continue. You can work around this in the AWS CLI version 1 by adding the flag `-–no-fail-on-empty-changeset`, which returns `0`.

Since this is a common use case, the AWS CLI version 2 defaults to returning a successful exit code of `0` when there is no change caused by a deployment and the operation returns an empty changeset.

To revert to the original behavior, add the flag `--fail-on-empty-changeset`.

### Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region
Amazon S3 and us-east-1 Region

When you configure theAWS CLI version 1 to use the `us-east-1` Region, the AWS CLI uses the global `s3.amazonaws.com` endpoint that is physically hosted in the `us-east-1` Region. The AWS CLI version 2 uses the true Regional endpoint `s3.us-east-1.amazonaws.com` when that Region is specified. To force the AWS CLI version 2 to use the global endpoint, you can set the Region for a command to `aws-global`.

### Changed default behavior for Regional AWS STS endpoints
AWS STS and Regional endpoints

By default, the AWS CLI version 2 sends all AWS Security Token Service (AWS STS) API requests to the Regional endpoint for the currently configured AWS Region. 

By default, any release before `1.42.0` for AWS CLI version 1 sends AWS STS requests to the global AWS STS endpoint. You can control this default behavior in version 1 by using the [https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html#cli-config-sts_regional_endpoints](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html#cli-config-sts_regional_endpoints) setting. 

Any releases on or after `1.42.0` uses the Regional endpoint as the default, if you are migrating to AWS CLI version 2 from these newer releases this behavior remains unchanged.

### `ecr get-login` removed and replaced with `ecr get-login-password`
Deprecate `ecr get-login`

The AWS CLI version 2 replaces the command `aws ecr get-login` with the `aws ecr get-login-password` command that improves automated integration with container authentication. 

The `aws ecr get-login-password` command reduces the risk of exposing your credentials in the process list, shell history, or other log files. It also improves compatibility with the `docker login` command for better automation.

The `aws ecr get-login-password` command is available in the AWS CLI version 1.17.10 and later, and the AWS CLI version 2. The earlier `aws ecr get-login` command is still available in the AWS CLI version 1 for backward compatibility. 

With the `aws ecr get-login-password` command, you can replace the following code that retrieves a password.

```
$ (aws ecr get-login --no-include-email)
```

To reduce the risk of exposing the password to the shell history or logs, use the following example command instead. In this example, the password is piped directly to the `docker login` command, where it is assigned to the password parameter by the `--password-stdin` option.

```
$ aws ecr get-login-password | docker login --username AWS --password-stdin MY-REGISTRY-URL
```

For more information, see [https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html](https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login-password.html) in the *AWS CLI version 2 Reference Guide*.

### AWS CLI version 2 support for plugins is changing
Changing support for `[plugins]`

Plugin support in the AWS CLI version 2 is completely provisional and is intended to help users migrate from AWS CLI version 1 until a stable, updated plugin interface is released. There are no guarantees that a particular plugin or even the AWS CLI plugin interface will be supported in future versions of the AWS CLI version 2. If you rely on plugins, be sure to lock into a particular version of the AWS CLI and test the functionality of your plugin when you do upgrade.

To enable plugin support, create a `[plugins]` section in your `~/.aws/config`.

```
[plugins]
cli_legacy_plugin_path = <path-to-plugins>/python3.7/site-packages
<plugin-name> = <plugin-module>
```

In the `[plugins]` section, define the `cli_legacy_plugin_path` variable and set its value to the Python site packages path where your plugin module is. Then, you can configure a plugin by providing a name for the plugin (`plugin-name`) and the file name of the Python module (`plugin-module`) that contains the source code for your plugin. The AWS CLI loads each plugin by importing its `plugin-module` and calling its `awscli_initialize` function.

### Hidden alias support removed
No hidden aliases

AWS CLI version 2 no longer supports the following hidden aliases that were supported in version 1. 

In the following table, the first column displays the service, command, and parameter that work in all versions, including the AWS CLI version 2. The second column displays the alias that no longer works in the AWS CLI version 2.


| Working service, command, and parameter | Obsolete alias | 
| --- | --- | 
| cognito-identity create-identity-pool open-id-connect-provider-arns | open-id-connect-provider-ar-ns | 
| storagegateway describe-tapes tape-arns | tape-ar-ns | 
| storagegateway.describe-tape-archives.tape-arns | tape-ar-ns | 
| storagegateway.describe-vtl-devices.vtl-device-arns | vtl-device-ar-ns | 
| storagegateway.describe-cached-iscsi-volumes.volume-arns | volume-ar-ns | 
| storagegateway.describe-stored-iscsi-volumes.volume-arns | volume-ar-ns | 
| route53domains.view-billing.start-time | start | 
| deploy.create-deployment-group.ec2-tag-set | ec-2-tag-set | 
| deploy.list-application-revisions.s3-bucket | s-3-bucket | 
| deploy.list-application-revisions.s3-key-prefix | s-3-key-prefix | 
| deploy.update-deployment-group.ec2-tag-set | ec-2-tag-set | 
| iam.enable-mfa-device.authentication-code1 | authentication-code-1 | 
| iam.enable-mfa-device.authentication-code2 | authentication-code-2 | 
| iam.resync-mfa-device.authentication-code1 | authentication-code-1 | 
| iam.resync-mfa-device.authentication-code2 | authentication-code-2 | 
| importexport.get-shipping-label.street1 | street-1 | 
| importexport.get-shipping-label.street2 | street-2 | 
| importexport.get-shipping-label.street3 | street-3 | 
| lambda.publish-version.code-sha256 | code-sha-256 | 
| lightsail.import-key-pair.public-key-base64 | public-key-base-64 | 
| opsworks.register-volume.ec2-volume-id | ec-2-volume-id | 

### The `api_versions` configuration file setting is not supported
`api_versions` not supported

The AWS CLI version 2 doesn't support calling earlier versions of AWS service APIs by using the `api_versions` configuration file setting. All AWS CLI commands now call the latest version of the service APIs that are currently supported by the endpoint.

### AWS CLI version 2 uses only Signature v4 to authenticate Amazon S3 requests


The AWS CLI version 2 doesn't support earlier signature algorithms to cryptographically authenticate service requests sent to Amazon S3 endpoints. This signing happens automatically with every Amazon S3 request and only the [Signature Version 4 Signing Process](https://docs.aws.amazon.com/AmazonS3/latest/userguide/reference_aws-signing.html) is supported. You can't configure the signature version. All Amazon S3 bucket presigned URLs now use only SigV4 and have a maximum expiration duration of one week.

### AWS CLI version 2 is more consistent with paging parameters
Paging parameters

In the AWS CLI version 1, if you specify pagination parameters on the command line, then automatic pagination is turned off as expected. However, when you specify pagination parameters by using a file with the `‐‐cli-input-json` parameter, automatic pagination was not turned off, which could result in unexpected output. The AWS CLI version 2 turns off automatic pagination regardless of how you provide the parameters.

### AWS CLI version 2 provides more consistent return codes across all commands


The AWS CLI version 2 is more consistent across all commands and properly returns an appropriate exit code compared to the AWS CLI version 1. We also added exit codes 252, 253, and 254. For more information on exit codes, see [Command line return codes in the AWS CLI](cli-usage-returncodes.md).

If you have a dependency on how the AWS CLI version 1 uses return code values, we recommend checking the exit codes to make sure that you're getting the values you expect. 

# Installing AWS CLI version 2 from AWS CLI version 1
Migration instructions

This topic provides instructions for migrating from AWS CLI version 1 to AWS CLI version 2.

AWS CLI versions 1 and 2 use the same `aws` command name. If you have both versions installed, your computer uses the first one found in your search path. If you previously installed AWS CLI version 1, we recommend that you do one of the following to use AWS CLI version 2:
+ ** Recommended** – [Uninstall AWS CLI version 1 and use only AWS CLI version 2](#cliv2-migration-instructions-migrate).
+ [To have both version installed](#cliv2-migration-instructions-side-by-side), use your operating system's ability to create a symbolic link (symlink) or alias with a different name for one of the two `aws` commands.

For information on breaking changes between version 1 and version 2, see [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md).

## Replacing version 1 with version 2


Perform the following steps to replace AWS CLI version 1 with AWS CLI version 2. 

**To replace AWS CLI version 1 with AWS CLI version 2**

1. Prepare any existing scripts you have for the migration by confirming any breaking changes between version 1 and version 2 in [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md). You can use the upgrade debug mode feature to guide your preparation by following the instructions in [Using upgrade debug mode to upgrade AWS CLI version 1 to AWS CLI version 2](cli-upgrade-debug-mode.md).

1. Uninstall the AWS CLI version 1 by following the uninstall instructions for your operating system in [Installing, updating, and uninstalling the AWS CLI version 1](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-install.html).

1. Confirm that the AWS CLI is completely uninstalled by using the following command.

   ```
   $ aws --version
   ```

   Complete one of the following based on the output:
   + **No version returned:** You've successfully uninstalled the AWS CLI version 1 and can proceed to the next step.
   + **A version is returned:** You still have an install of the AWS CLI version 1. For troubleshooting steps, see [The "`aws --version`" command returns a version after uninstalling the AWS CLI](cli-chap-troubleshooting.md#tshoot-uninstall-1). Perform troubleshooting steps until no version output is received.

1. Install the AWS CLI version 2 by following the appropriate install instructions for your operating system in [Installing or updating to the latest version of the AWS CLI](getting-started-install.md).

## Side-by-side install


To have both versions installed, use your operating system's ability to create a symbolic link (symlink) or alias with a different name for one of the two `aws` commands. 

1. Install the AWS CLI version 2 by following the appropriate install instructions for your operating system in [Installing or updating to the latest version of the AWS CLI](getting-started-install.md).

1. Use your operating system's ability to create a symlink or alias with a different name for one of the two `aws` commands, such as using *`aws2`* for AWS CLI version 2. The following are symlink examples for AWS CLI version 2. Replace the *PATH* with your install location.

------
#### [ Linux and macOS ]

   You can use a [symbolic link](https://www.linux.com/topic/desktop/understanding-linux-links/) or [alias](https://www.linux.com/topic/desktop/aliases-diy-shell-commands/) on Linux and macOS.

   ```
   $ alias aws2='PATH'
   ```

------
#### [ Windows command prompt ]

   [https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/doskey](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/doskey) on Windows.

   ```
   C:\> doskey aws2=PATH
   ```

------

# Using upgrade debug mode to upgrade AWS CLI version 1 to AWS CLI version 2
Using upgrade debug mode

This topic describes the upgrade debug mode in AWS CLI version 1.

We recommend that users of AWS CLI version 1 upgrade to AWS CLI version 2 to access new features and enhanced performance. There are changes in behavior between AWS CLI version 1 and AWS CLI version 2 that might require you to update your scripts or commands to get the same behavior. The upgrade debug mode in AWS CLI version 1 outputs warnings when you use features that have different behavior in AWS CLI version 2. This feature improves the upgrade experience by automatically detecting which of your AWS CLI version 1 commands need to be modified before upgrading to AWS CLI version 2 to prevent unexpected issues.

For more details, see [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) in [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md).

## Prerequisites


The upgrade debug mode feature was introduced to the AWS CLI in version `1.44.0`.

Using AWS CLI version 1, run `aws --version`, and verify that the AWS CLI version is `1.44.0` or higher.

If the version is less than `1.44.0`, see [Installing, updating, and uninstalling the AWS CLI](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-install.html).

## How it works


If enabled, the upgrade debug mode detects usage of features that were updated with breaking changes in AWS CLI version 2. If you use a command or feature listed in our [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) after upgrading to AWS CLI version 2, a warning will be shown in the output. Breaking change detection is based on the command used, the arguments supplied, the execution environment (e.g. environment variables, configuration settings, etc.), and for a few cases, the content or configuration of resources in the AWS account being used.

The warnings describe actions to prevent unexpected issues of upgrading to AWS CLI version 2. After making the changes recommended by a warning message, you can confirm the command has been updated successfully by re-running the command to verify the warning is no longer shown. Warnings being resolved signals that the command is no longer likely to experience the breaking change described upon upgrading to AWS CLI version 2.

The following example demonstrates what these warnings look like. This command demonstrates an example warning. All warning text starts with "AWS CLI V2 UPGRADE WARNING," followed by the specific warning message. In this case, a warning is output because the command relies on the AWS CLI to retrieve the contents of the URL and use the contents as the `--template-body` parameter value, which was a feature removed in AWS CLI version 2.

```
$ aws cloudformation create-stack \
  --stack-name "stack012345" \
  --template-body "https://s3.amazonaws.com/amzn-s3-demo-bucket/template.json"

AWS CLI v2 UPGRADE WARNING: For input parameters that have a prefix of http:// or 
https://, AWS CLI v2 will not automatically request the content of the URL for 
the parameter, and the `cli_follow_urlparam` option has been removed. See 
https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html#cliv2-migration-paramfile.
```

The following table of all breaking changes, and how to avoid facing a breaking change in AWS CLI version 2. Remediation actions that resolve the warnings in debug mode are in bold. 


| Breaking change | On v1, migrate to v2 behavior | On v2, retain v1 behavior | 
| --- | --- | --- | 
| [Environment variable added to set text file encoding](cliv2-migration-changes.md#cliv2-migration-encodingenvvar) | Unset the PYTHONUTF8 and PYTHONIOENCODING environment variables. | Set the AWS\$1CLI\$1FILE\$1ENCODING environment variable to the encoding specified in v1. | 
| [Binary parameters are passed as base64-encoded strings by default](cliv2-migration-changes.md#cliv2-migration-binaryparam) | Encode the value of the parameter with base64. If the parameter is being loaded from a file, encode the file contents with base64. | Set the cli\$1binary\$1format setting to raw-in-base64-out. | 
| [Improved Amazon S3 handling of file properties and tags for multipart copies](cliv2-migration-changes.md#cliv2-migration-s3-copy-metadata) | N/A. Cannot migrate to version 2 behavior in version 1. | Use the --copy-props none parameter. | 
| [No automatic retrieval of `http://` or `https://` URLs for parameters](cliv2-migration-changes.md#cliv2-migration-paramfile) | Use curl (or alternative tools) to download the contents of the URLs to a local file. Then, load the file contents to the parameter with [file://](https://docs.aws.amazon.com/cli/v1/userguide/cli-usage-parameters-file.html). Alternatively, configure cli\$1follow\$1urlparam to false to specify the raw URL as the paramater value. | N/A. Impossible to retain version 1 behavior in version 2. | 
| [Pager used for all output by default](cliv2-migration-changes.md#cliv2-migration-output-pager) | N/A. Cannot migrate to version 2 behavior in version 1. | Set the cli\$1pager setting or AWS\$1PAGER variable to an empty string. | 
| [Timestamp output values are standardized to ISO 8601 format](cliv2-migration-changes.md#cliv2-migration-timestamp) | Set the cli\$1timestamp\$1format setting to iso8601. | Set the cli\$1timestamp\$1format setting to wire. | 
| [Improved handling of CloudFormation deployments that result in no changes](cliv2-migration-changes.md#cliv2-migration-cfn) | Use the --no-fail-on-empty-changeset parameter. | Use the --fail-on-empty-changeset parameter. | 
| [Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region](cliv2-migration-changes.md#cliv2-migration-s3-regional-endpoint) | Set the AWS\$1ENDPOINT\$1URL\$1S3 environment variable or the --endpoint-url command line option to the us-east-1 [regional URL](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_region). | Use the --region aws-global command line option. | 
| [`ecr get-login` removed and replaced with `ecr get-login-password`](cliv2-migration-changes.md#cliv2-migration-ecr-get-login) | (1.17.10 or later) Use [`ecr get-login` removed and replaced with `ecr get-login-password`](cliv2-migration-changes.md#cliv2-migration-ecr-get-login) and pipe the output into a docker command. | N/A. Impossible to retain version 1 behavior in version 2. | 
| [AWS CLI version 2 support for plugins is changing](cliv2-migration-changes.md#cliv2-migration-profile-plugins) | N/A. Cannot migrate to version 2 behavior in version 1. | Configure the [cli\$1legacy\$1plugin\$1path](https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#plugins) to the [plugins] section of the configuration file. Test plugins in version 2, lock your version 2 version, and test your plugins each time you upgrade. | 
| [Hidden alias support removed](cliv2-migration-changes.md#cliv2-migration-aliases) | Switch from using the obsolete hidden alias to [Hidden alias support removed](cliv2-migration-changes.md#cliv2-migration-aliases) that works in all versions. | N/A. Impossible to retain version 1 behavior in version 2. | 
| [The `api_versions` configuration file setting is not supported](cliv2-migration-changes.md#cliv2-migration-api-versions) | Migrate and test your usage of older API versions to the latest API version, and remove [api\$1versions](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html#cli-config-api_versions) from your configuration settings. | N/A. Impossible to retain version 1 behavior in version 2. | 
| [AWS CLI version 2 uses only Signature v4 to authenticate Amazon S3 requests](cliv2-migration-changes.md#cliv2-migration-sigv4) | Specify the Signature Version to version 4 (see [Specifying the Signature Version in request authentication)](https://docs.aws.amazon.com/AmazonS3/latest/API/specify-signature-version.html). | N/A. Impossible to retain version 1 behavior in version 2. | 
| [AWS CLI version 2 is more consistent with paging parameters](cliv2-migration-changes.md#cliv2-migration-skeleton-paging) | Move the pagination parameters in the input JSON parameter to the command itself. | Remove the pagination parameters from the input JSON parameter. | 
| [AWS CLI version 2 provides more consistent return codes across all commands](cliv2-migration-changes.md#cliv2-migration-return-codes) | N/A. Cannot migrate to version 2 behavior in version 1. | N/A. Impossible to retain version 1 behavior in version 2. | 

## Limitations


We strongly recommend customers review our [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking).

### Unsupported Breaking Change Detection


The upgrade debug mode feature supports every breaking change except that [AWS CLI version 2 provides more consistent return codes across all commands](cliv2-migration-changes.md#cliv2-migration-return-codes). This mode cannot account for how you use the error codes returned by the AWS CLI downstream.

### Conditional Breaking Change Detection


Detection of [Timestamp output values are standardized to ISO 8601 format](cliv2-migration-changes.md#cliv2-migration-timestamp) is the only case where detection depends on the state of the AWS account, and may be subject to breaking changes if the account resources are updated later. If no timestamps are included in the API response from the service, no detections will be made for this breaking change.

If you rely on the timestamp format returned by AWS CLI commands and have not already configured the AWS CLI to use ISO 8601, take extra precaution to ensure your processing of the timestamp will not break after upgrading to version 2.

### Unresolvable Breaking Change Detection


Some warnings output by upgrade debug mode cannot be resolved by modifying the command or environment. The following cases are cases where warnings would always be output by upgrade debug mode as long as you use the corresponding feature:
+ [AWS CLI version 2 support for plugins is changing](cliv2-migration-changes.md#cliv2-migration-profile-plugins) - if you rely on plugins in your [configuration file](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html), the upgrade debug mode will always output a warning that cannot be resolved. This mode cannot guarantee whether any of your plugins will work in AWS CLI version 2.
+ [Improved Amazon S3 handling of file properties and tags for multipart copies](cliv2-migration-changes.md#cliv2-migration-s3-copy-metadata) - if `aws s3` is used to perform a bucket-to-bucket Amazon Amazon S3 copy, the upgrade debug mode will always output a warning that cannot be resolved.

### False detections


Warnings output by the upgrade debug mode do not guarantee that breaking changes will be faced after upgrading to AWS CLI v2. Below are cases where warnings would be output by upgrade debug mode, despite there being no breaking change introduced in AWS CLI v2:
+ [Environment variable added to set text file encoding](cliv2-migration-changes.md#cliv2-migration-encodingenvvar) - if the `PYTHONUTF8` or `PYTHONIOENCODING` environment variables are specified to set the text file encoding, and the specified encoding already matches the installed locale, the warning might be a false detection since debug mode does not check if the encoding matches the installed locale.
+ [Improved Amazon S3 handling of file properties and tags for multipart copies](cliv2-migration-changes.md#cliv2-migration-s3-copy-metadata) - if `aws s3` is used to perform a bucket-to-bucket Amazon Amazon S3 copy, and the copy is not multipart due to the source object being under the [multipart threshold size](https://docs.aws.amazon.com/cli/latest/topic/s3-config.html#multipart-threshold), a false detection will be output.
+ [Timestamp output values are standardized to ISO 8601 format](cliv2-migration-changes.md#cliv2-migration-timestamp) - if the cli\$1timestamp\$1format configuration setting is set to wire (default), and a timestamp in ISO 8601 format is returned by the service.
+ [Improved handling of CloudFormation deployments that result in no changes](cliv2-migration-changes.md#cliv2-migration-cfn) - if the `--fail-on-empty-changeset` flag is used with the `aws cloudformation deploy` command, and the resulting changeset is empty, a false detection will be output. Also, if the changeset is non-empty, and `--no-fail-on-empty-changeset` is not used, a false detection will be output.
+ [Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region](cliv2-migration-changes.md#cliv2-migration-s3-regional-endpoint) - if `aws s3` or `aws s3api` is used to perform an Amazon Amazon S3 operation, and the region is configured to `us-east-1`, and the `s3.us_east_1_regional_endpoint` configuration is not configured to regional, and the global Amazon S3 endpoint is used for the request due to the [endpoint configuration settings](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-endpoints.html#endpoints-precedence), then the warning might be a false detection, since debug mode does not check configured endpoint settings.

## Configure upgrade debug mode


You can enable or disable upgrade debug mode using the following methods, listed in order of precedence:
+ Command line options enable or disable upgrade debug mode for a single command. Use [--v2-debug](https://docs.aws.amazon.com/cli//latest/userguide/cli-configure-options.html#cli-configure-options-v2-debug) to use upgrade debug mode.
+ Environment variables use the [AWS\$1CLI\$1UPGRADE\$1DEBUG\$1MODE](https://docs.aws.amazon.com/cli//latest/userguide/cli-configure-envvars.html#envvars-list-aws_cli_upgrade_debug_mode) variable.

# Using AWS CLI v1-to-v2 Migration Tool to upgrade AWS CLI version 1 to AWS CLI version 2
Using AWS CLI v1-to-v2 Migration Tool

This topic describes the AWS CLI v1-to-v2 Migration Tool.

We recommend that users of AWS CLI version 1 upgrade to AWS CLI version 2 to access new features and enhanced performance. There are changes in behavior between AWS CLI version 1 and AWS CLI version 2 that might require you to update your scripts or commands to get the same behavior. The AWS CLI v1-to-v2 Migration Tool analyzes bash scripts containing AWS CLI version 1 commands and detects usage of features that have been updated with breaking changes in AWS CLI version 2. Additionally, the tool can automatically modify your scripts to fix most issues that it detects. This tool improves the upgrade experience by automatically detecting and modifying AWS CLI version 1 commands in bash scripts to prevent unexpected issues when upgrading to version 2.

Compared to Upgrade Debug Mode, the AWS CLI v1-to-v2 Migration Tool is a standalone tool and does not require executing AWS CLI commands. For a thorough comparison between the Upgrade Debug Mode and the AWS CLI v1-to-v2 Migration Tool see [Using AWS CLI Migration Tools to Mitigate Breakage](cliv2-migration.md#using-migration-tools) in [Migration guide for the AWS CLI version 2](cliv2-migration.md).

For more details, see [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) in [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md).

## How it Works


The AWS CLI v1-to-v2 Migration Tool is a Python package capable of linting bash scripts that use AWS CLI version 1. Being a static linter, it does not depend on the version of AWS CLI version 1 that you may have installed on your machine. The linter is invoked through the command line, where the local file path to the bash script is supplied as a parameter.

The migration tool can also automatically produce a modified bash script that resolves most findings that it detects by modifying the AWS CLI version 1 commands used in the script. The migration tool modifies commands so that they are compatible with AWS version 2 and retains the behavior of version 1.

For some findings, the AWS CLI v1-to-v2 Migration Tool can detect them but not offer an automatic fix. In these cases, the migration tool flags them as detections that require manual review.

See [Limitations](#migration-tool-limitations) for an exhaustive list of breaking changes and automatic fixes that the AWS CLI v1-to-v2 Migration Tool supports.

## Prerequisites


### Python


To use this tool, you must have Python 3.9 or later installed.

To verify that you have a correct Python version installed, run the following command in a terminal and confirm the output shows a Python version of at least 3.9.

```
$ python3 --version
```

If you have an older version of Python, or do not have Python installed, you can download a compatible version from the [official Python download page](https://www.python.org/downloads/).

### pip


In addition to having a compatible version of Python installed, you must have `pip` installed.

To verify that `pip` is installed, run the following command:

```
$ python3 -m pip --version
```

If you have `pip` installed, you will see an output similar to the following:

```
pip 25.0.1 from ~/.local/lib/python3.13/site-packages (python 3.13)
```

If you do not have `pip` installed, see [Install pip](https://docs.aws.amazon.com/cli/v1/userguide/install-linux.html#install-linux-pip-pip).

## Installation


Install the AWS CLI v1-to-v2 Migration Tool in a new virtual environment:

```
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install aws-cli-migrate
```

## Usage


### Dry-run Mode (default)


With dry-run mode, you can automatically detect AWS CLI version 1 commands that are subject to breaking changes without modifying the input script:

```
$ migrate-aws-cli --script upload_s3_files.sh
```

### Auto-fix Mode


With auto-fix mode, you can automatically detect and update AWS CLI version 1 commands in the input script to mitigate breakage from changes introduced in AWS CLI version 2, where possible:

```
$ migrate-aws-cli --script upload_s3_files.sh --fix
```

Optionally, you can supply an output path via the `--output` parameter to write the updated script, rather than updating the input script:

```
$ migrate-aws-cli --script upload_s3_files.sh --output upload_s3_files_v2.sh --fix
```

### Interactive Mode


With interactive mode, you can automatically detect AWS CLI version 1 commands that are subject to breaking changes. Most findings will show a suggested fix to mitigate breakage in AWS CLI version 2. You can review the suggested fixes and decide whether to apply them. Optionally, supply an output path via the `--output` parameter to control where to write the updated script:

```
$ migrate-aws-cli --script upload_s3_files.sh --interactive \
--output upload_s3_files_v2.sh
```

The following output snippet is an example finding in interactive mode:

```
14 14│ 
15 15│ aws s3 ls s3://mybucket
16 16│ 
17   │-aws s3 cp s3://amzn-demo-bucket s3://amzn-demo-bucket2 --recursive
   17│+aws s3 cp s3://amzn-demo-bucket s3://amzn-demo-bucket2 --recursive --copy-props none
18 18│ 
19 19│ TEMPLATE_KEY="cloudformation/$(basename "$TEMPLATE_FILE")"
20 20│ 

examples/upload_s3_files.sh:17 [s3-copy] In AWS CLI v2, object properties will be copied 
from the source in multipart copies between S3 buckets. If a copy is or becomes multipart 
after upgrading to AWS CLI v2, extra API calls will be made. See 
https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html#cliv2-migration-s3-copy-metadata.

Apply this fix? [y] yes, [n] no, [a] accept all of type, [r] reject all of type, [u] update all, 
[s] save and exit, [q] quit:
```

The suggested fix is shown in a format similar to a Git diff. The migration tool suggests the removal of lines starting with a `-`, and suggests adding lines starting with a `+`. In the previous example, the suggestion can be interpreted as adding the `--copy-props none` parameter to the AWS CLI version 1 command that executes an Amazon S3 copy.

For each suggested fix, you can enter any of the following controls:
+ Enter `y` to accept the suggested fix.
+ Enter `n` to reject the current fix.
+ Enter `a` to accept all fixes with the same type.
+ Enter `r` to reject all fixes with the same type.
+ Enter `u` to accept all remaining fixes.
+ Enter `s` to save and exit.
+ Enter `q` to quit without saving.

Some findings may be flagged for manual review without a suggested fix. You should review these findings and verify whether you are impacted by the referenced breaking changes. If you are impacted by these findings, you should follow the guidance specified in the finding description to make the necessary changes to avoid or prepare for the breaking changes introduced in AWS CLI version 2.

## Limitations


The AWS CLI v1-to-v2 Migration Tool does not currently support every breaking change introduced with AWS CLI version 2, and has false positive cases where it outputs detections for commands even if no breaking changes would actually be faced.

We strongly recommend customers understand [Breaking changes between AWS CLI version 1 and AWS CLI version 2](cliv2-migration-changes.md#cliv2-migration-changes-breaking) published in [New features and changes in the AWS CLI version 2](cliv2-migration-changes.md).

### Text-based Analysis


The migration tool analyzes your script without running it. This limits how it detects AWS CLI commands for breaking changes. The migration tool can only examine the text of an AWS CLI command. It cannot detect issues that arise at runtime, such as storing deprecated parameters in a variable instead of passing them directly to the AWS CLI.

### Unsupported Breaking Change Detection


The extent of support for breaking changes in the migration tool is summarized in the following table.


| Breaking change | Detection supported | Auto-fix supported | 
| --- | --- | --- | 
| [Environment variable added to set text file encoding](cliv2-migration-changes.md#cliv2-migration-encodingenvvar) | No | No | 
| [Binary parameters are passed as base64-encoded strings by default](cliv2-migration-changes.md#cliv2-migration-binaryparam) | Yes | Yes | 
| [Improved Amazon S3 handling of file properties and tags for multipart copies](cliv2-migration-changes.md#cliv2-migration-s3-copy-metadata) | Yes | Yes | 
| [No automatic retrieval of `http://` or `https://` URLs for parameters](cliv2-migration-changes.md#cliv2-migration-paramfile) | No | No | 
| [Pager used for all output by default](cliv2-migration-changes.md#cliv2-migration-output-pager) | Yes | Yes | 
| [Timestamp output values are standardized to ISO 8601 format](cliv2-migration-changes.md#cliv2-migration-timestamp) | No | No | 
| [Improved handling of CloudFormation deployments that result in no changes](cliv2-migration-changes.md#cliv2-migration-cfn) | Yes | Yes | 
| [Changed default behavior for Regional Amazon S3 endpoint for `us-east-1` Region](cliv2-migration-changes.md#cliv2-migration-s3-regional-endpoint) | No | No | 
| [Changed default behavior for Regional AWS STS endpoints](cliv2-migration-changes.md#cliv2-migration-sts-regional-endpoint) | No | No | 
| [`ecr get-login` removed and replaced with `ecr get-login-password`](cliv2-migration-changes.md#cliv2-migration-ecr-get-login) | Yes | No | 
| [AWS CLI version 2 support for plugins is changing](cliv2-migration-changes.md#cliv2-migration-profile-plugins) | No | No | 
| [Hidden alias support removed](cliv2-migration-changes.md#cliv2-migration-aliases) | Yes | Yes | 
| [The `api_versions` configuration file setting is not supported](cliv2-migration-changes.md#cliv2-migration-api-versions) | No | No | 
| [AWS CLI version 2 uses only Signature v4 to authenticate Amazon S3 requests](cliv2-migration-changes.md#cliv2-migration-sigv4) | No | No | 
| [AWS CLI version 2 is more consistent with paging parameters](cliv2-migration-changes.md#cliv2-migration-skeleton-paging) | Yes | No | 
| [AWS CLI version 2 provides more consistent return codes across all commands](cliv2-migration-changes.md#cliv2-migration-return-codes) | No | No | 