Reputation: 1030
Getting permission denied error
after installing aws-cli version using the official AWS guide while running aws --version
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Upvotes: 7
Views: 12359
Reputation: 81
What helped me here was I wasn't following the AWS provided instructions exactly. I tried curl-ing the .zip file into a different directory and unzipping it from there. The .zip file needs to be in the root directory for proper installation. FWIW I was installing using a Dockerfile with an Ubuntu Jammy base image.
Upvotes: 0
Reputation: 1030
Fix to this issue would be to provide the right set of file permissions to aws-cli.
which aws # Find the path of aws-cli, say /usr/local/aws-cli/
sudo chmod -R 755 /usr/local/aws-cli/
Upvotes: 20