This documentation is for Version 1 of the Amazon CLI only. For documentation related to Version 2 of the Amazon CLI, see the Version 2 User Guide.
Command line return codes in the Amazon CLI
The return code is usually a hidden code sent after running a Amazon Command Line Interface (Amazon CLI) command
which describes the status of the command. You can use the echo
command to display
the code sent from the last Amazon CLI command and use these codes to determine if a command was
successful or if it failed, and why a command might have an error. In addition to the return
codes, you can view more details about a failure by running your commands with the
--debug
switch. This switch produces a detailed report of the steps the Amazon CLI
uses to process the command, and what the result of each step was.
To determine the return code of an Amazon CLI command, run one of the following commands immediately after running the CLI command.
The following are the return code values that can be returned at the end of running an Amazon Command Line Interface (Amazon CLI) command.
Code | Meaning |
---|---|
0 |
The service responded with an HTTP response status code of 200 indicating that there were no errors generated by the Amazon CLI and Amazon service the request was sent to. |
1 |
One or more Amazon S3 transfer operations failed. Limited to S3 commands. |
2 |
The meaning of this return code depends on the command:
|
130 |
The command was interrupted by a SIGINT. This is the signal sent by you to cancel
a command with |
255 |
The command failed. There were errors generated by the Amazon CLI or by the Amazon service to which the request was sent. |