Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error creating Key Pair: You are not authorized to perform this operation

I am trying to create an EC2 instance and on the last step of launching I try to create a key pair ( which will generate a .pem file for login) and I get the below error. Error Error creating Key Pair: You are not authorized to perform this operation.

Can anyone tell me what authentication should I give to my IAM right now I have Admin access.

Not very sure what is causing the Issue.

-Rashmi

like image 374
Raashi Avatar asked Jan 24 '17 10:01

Raashi


2 Answers

Try adding AmazonEC2FullAccess CreateKeyPair policy.

If you are not sure how to do it:

Log in to IAM, then choose necessary user and on Permissions tab click Add permission button. On next page click on Attach existing policies directly button and look for CreateKeyPair policy. Attach it. This worked for me.

like image 167
Serge Avatar answered Nov 07 '22 16:11

Serge


Yes Giving AmazonEC2FullAccess to the IAM user group solved the issue.

enter image description here

Above screen shows that when you create the group you are supposed to give access to the service.

like image 28
Arun Prasath Avatar answered Nov 07 '22 17:11

Arun Prasath