Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (12.9k points)

I am trying to setup AWS CLI tools and was following instructions at

However, after following all the steps and setting up my AWS_ACCESS_KEY and AWS_SECRET_KEY, I get

$ ec2-describe-regions

Client.UnauthorizedOperation: You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: 55f02cc4-2e9f-4a0a-8b55-46bcc1973f50)

I then tried regenerating new credentials, but still getting the same error. I couldn't seem to find information about anyone else having this issue. I tried passing the keys using -O and -W, but that doesn't work either.

Any idea what I might be doing wrong?

1 Answer

0 votes
by (18.2k points)

If you are on your free tier period, you will find that it's easier to grant administrator policy to a single user, which will support access from all the Amazon command-line tools.

Here's what you need to do:

1. Go to your amazon console and navigate to IAM dashboard

2. Select policies from the menu on the left

3. Create Administrator Policy

4. select the Administrator checkbox and attach it your user

Now you will have full command line access for a specified user.

Related questions

Browse Categories