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

AWS command is not working


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/", line 70, in main driver = create_clidriver() File "/usr/lib/python2.7/site-packages/awscli/", line 80, in create_clidriver event_hooks=session.get_component('event_emitter')) File "/usr/lib/python2.7/site-packages/awscli/", line 46, in load_plugins modules = _import_plugins(plugin_mapping) File "/usr/lib/python2.7/site-packages/awscli/", line 63, in _import_plugins module = import(path, fromlist=[module]) File "/usr/lib/python2.7/site-packages/awscli/", line 27, in <module> from awscli.customizations.cloudformation import initialize as cloudformation_init File "/usr/lib/python2.7/site-packages/awscli/customizations/cloudformation/", line 13, in <module> from awscli.customizations.cloudformation.package import PackageCommand File "/usr/lib/python2.7/site-packages/awscli/customizations/cloudformation/", line 27, in <module> from awscli.customizations.s3uploader import S3Uploader File "/usr/lib/python2.7/site-packages/awscli/customizations/", line 23, in <module> from s3transfer.manager import TransferManager File "/usr/lib/python2.7/site-packages/s3transfer/", line 480 **extra_args, ^ SyntaxError: invalid syntax

Kindly help me to fix this issue

1 Answers

Looks like you are using Python 2.7.

Please take a look at this -'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