AWS is not recognized as an internal or external command, operable command, or batch file
I am currently engaged in a particular task that is related to setting up a development environment on a new computer however I have encountered the error message “aws is not recognized as an internal or external command, operable command or batch file.” When trying to use the AWS command line interface. How can I troubleshoot and resolve this particular issue?
In the context of AWS, here are the steps given for how you can troubleshoot and resolve your particular Issue:-
Checking AWS CLI installation
First, you should ensure that you have the AWS CLI in your particular system. If not installed then you can install the AWS CLI from the official AWS website.
Verify environment variables
You can check if the AWS CLI executable path is included in your system's PATH environment variable.
Update the PATH Variable
You can also add manually the AWS CLI directory in your PATH if it is not presented.
Restart the terminal or command prompt
After updating the PATH Variable, you can close and re-open your terminal or command prompt windows to apply the changes.
Verify the AWS CLI installation
Once you have updated the PATH you can run “aws --- version” again in your terminal or even command prompt so that you can verify that the AWS CLI is now recognized as a command.
For Windows
REM Step 1: Check AWS CLI Installation
Aws –version
REM Step 2: Verify Environment Variables
Echo %PATH%
REM Step 3: Update PATH Variable (if needed)
Setx PATH “%PATH%;C:Program FilesAmazonAWSCLI”
REM Step 4: Restart Command Prompt
REM Close the current command prompt window and reopen it
REM Step 5: Verify AWS CLI Installation (Again)
Aws –version
For UNIX based system
# Step 1: Check AWS CLI Installation
Aws –version
# Step 2: Verify Environment Variables
Echo $PATH
# Step 3: Update PATH Variable (if needed)
Echo ‘export PATH=/usr/local/bin/aws:$PATH’ >> ~/.bashrc
Source ~/.bashrc
# Step 4: Restart Terminal
# Close the current terminal window and reopen it
# Step 5: Verify AWS CLI Installation (Again)
Aws –version
Here is the coding structure given in HTML which can guide you through the steps or looking into the steps for solving the issue of AWS is not recognised:-
<meta</span> charset=”UTF-8”>
<meta</span> name=”viewport” content=”width=device-width, initial-scale=1.0”>
AWS CLI Troubleshooting
- Check AWS CLI Installation: Open a terminal or command prompt and run
aws –version
. - Verify Environment Variables: Run
echo %PATH%
(Windows) orecho $PATH
(Unix-based systems) to view the PATH variable’s contents. - Update PATH Variable (if needed):
- Windows: Add the AWS CLI directory path to the PATH variable using
setx PATH “%PATH%;C:Program FilesAmazonAWSCLI”
. - Unix-based: Edit
~/.bashrc
or~/.bash_profile
to includeexport PATH=/usr/local/bin/aws:$PATH
and then runsource ~/.bashrc
to apply the changes.
- Windows: Add the AWS CLI directory path to the PATH variable using
- Restart Terminal or Command Prompt: Close and reopen the terminal or command prompt.
- Verify AWS CLI Installation (Again): Run
aws –version
to check if the AWS CLI is recognized as a command.