Raja CSP Raman

s3 bucket —AWS

You might have got an error like below when you deal with s3 commands in terminal:

SyntaxError: invalid syntax

I will share my scenario and talk about the solution in this article.

In terminal, when I typed

aws s3

it threw error as below:

aws s3
Traceback (most recent call last):
File "/opt/anaconda3/envs/py38/bin/aws", line 5, in <module>
from aws.main import main
File "/opt/anaconda3/envs/py38/lib/python3.8/site-packages/aws/main.py", line 23
print '%(name)s: %(endpoint)s' % {
SyntaxError: invalid syntax

At first I didn’t have a clue about this error. Later, I figured out that aws library in my custom environment throwing error.

So, I had to get out of my custom environment by using

conda deactivate

then gave it a try

aws s3

Now, it didn’t throw invalid syntax error.

Happy S3ing!!