0 votes
1 view
in AWS by (8.9k points)

I am trying to setup AWS CLI tools and was following instructions at http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html#setting_up_ec2_command_linux

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.5k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !