I am getting the below exception while trying to run any AWS command on my MacBook, for example:
Command
aws s3api create-bucket --bucket my_backup --region us-west-2 --create-
bucket-configuration LocationConstraint=us-west-1
Exception
Traceback (most recent call last):
File "/Users/avinash/.local/share/virtualenvs/pipend_shell_3-
x8skfE25/bin/aws", line 7, in <module>
from aws.main import main
File "/Users/avinash/.local/share/virtualenvs/pipend_shell_3-
x8skfE25/lib/python3.6/site-packages/aws/main.py", line 23
print '%(name)s: %(endpoint)s' % {
^
SyntaxError: invalid syntax
I am using Python 3.6.5 and have installed aws
:
pip install aws
If the aws command cannot be found after first installing or updating the AWS CLI, you might need to restart your terminal for it to recognize any PATH updates. If the aws command cannot be found after first installing or updating the AWS CLI, it might not have been fully installed.
AWS CLI v2 provides pre-built binaries for Windows, Linux, and macOS. You no longer need to have Python installed in order to use the AWS CLI. You don't have to worry about compatible Python versions, virtual environments, or conflicting python packages.
Use the describe-configuration-recorder-status command to check that the AWS Config has started recording the configurations of the supported AWS resources existing in your account. The recorded configurations are delivered to the specified delivery channel.
I figured out the issue. I did pip install aws
instead of pip install awscli
.
We need to use the below command to install AWS CLI:
pip install awscli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With