By using AWS re:Post, you agree to the Terms of Use

AWS command is not working

0

While executing the below commands its throws an error

**Command: ** aws --version

Error: Traceback (most recent call last): File "/bin/aws", line 27, in <module> sys.exit(main()) File "/bin/aws", line 23, in main return awscli.clidriver.main() File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 70, in main driver = create_clidriver() File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 80, in create_clidriver event_hooks=session.get_component('event_emitter')) File "/usr/lib/python2.7/site-packages/awscli/plugin.py", line 46, in load_plugins modules = _import_plugins(plugin_mapping) File "/usr/lib/python2.7/site-packages/awscli/plugin.py", line 63, in _import_plugins module = import(path, fromlist=[module]) File "/usr/lib/python2.7/site-packages/awscli/handlers.py", line 27, in <module> from awscli.customizations.cloudformation import initialize as cloudformation_init File "/usr/lib/python2.7/site-packages/awscli/customizations/cloudformation/init.py", line 13, in <module> from awscli.customizations.cloudformation.package import PackageCommand File "/usr/lib/python2.7/site-packages/awscli/customizations/cloudformation/package.py", line 27, in <module> from awscli.customizations.s3uploader import S3Uploader File "/usr/lib/python2.7/site-packages/awscli/customizations/s3uploader.py", line 23, in <module> from s3transfer.manager import TransferManager File "/usr/lib/python2.7/site-packages/s3transfer/init.py", line 480 **extra_args, ^ SyntaxError: invalid syntax

Kindly help me to fix this issue

1 Answers
0

Looks like you are using Python 2.7.

Please take a look at this - https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/#:~:text=Pip%20Installation%20%E2%80%93%20If%20you're,for%20getting%20your%20environment%20setup.

It mentions the following - "If you’re currently using Python 2.7 as your runtime for AWS CLI v1, we recommend downloading Python 3.6 or later. You can follow our CLI upgrade guide for getting your environment setup."

Please upvote and accept my answer if it resolves your issue. Thanks

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions