0

Since pip shouldn't be used with sudo, why does Amazon give install directions as:

Install the AWS CLI Using pip

With Python and pip installed, use pip to install the AWS CLI:

...

Linux, OS X, or Unix

$ sudo pip install awscli

instead of the preferred pip install --user awscli? (After, presumably, installing pip with sudo.)

What does @EdWinks know that Amazon doesn't? Why does Amazon suggest an insecure install method?

Thufir
  • 4,631

1 Answers1

4

To quote the quote in the answer you don't seem to understand:

In other words, you run arbitrary Python code from the Internet as root.

Now, Amazon employees wrote the CLI for their systems. They know the code. They trust it enough to run it as root. That is why they suggest it. Amazon isn't telling you to install random packages using sudo pip, they're only talking about their own.

If you want to extrapolate that to every PyPI package, that's your funeral.

Of course, the question still remains: Do you trust Amazon enough to run their code as root?

muru
  • 207,228