The error “‘aws’ is not recognized as an internal or external command” occurs when the AWS CLI (Command Line Interface) is not installed or properly configured on your system. This issue arises when the system cannot find the executable for the AWS CLI in its environment variables.
Reasons for The Error: ‘aws’ is not recognized as an internal or external command
- AWS CLI Not Installed: The AWS CLI may not be installed on your system, or the installation needs completion.
- Incorrect Path Configuration: The path to the AWS CLI executable is not included in the system’s PATH environment variable, so the operating system does not know where to find it.
- Old or Incorrect Version Installed: A previous or corrupted installation of AWS CLI could be causing conflicts.
- System Requires Restart: In some cases, after installation or updating environment variables, a restart is required for the changes to take effect.
Steps to Troubleshoot the Error
Step 1. Check if AWS CLI is Installed: To check whether the AWS CLI is installed, you can try running the following command in your terminal or command prompt:
If you receive the same error (‘aws’ is not recognized…), the AWS CLI is likely not installed or configured correctly.
Step 2. Install or Reinstall the AWS CLI:
For Windows:
- Download the AWS CLI installer from the official AWS CLI documentation.
- Run the installer and follow the instructions.
After installation, go to a new command prompt, and verify it by running:
By following these steps, you should resolve the “‘aws’ is not recognized as an internal or external command” error and be able to use the AWS CLI to manage your AWS resources.
Xieles team is here to help you with these issues.