0
votes

I am getting an error when I try to Create a New Key Pair in AWS EC2. The specific error is: "Error creating Key Pair: You are not authorized to perform this operation."

I can confirm my account has the AmazonEC2FullAccess role. I cannot even Create a New Key Pair even before creating a new EC2 instance.

Can anyone provide insight as to this error and how to fix it?

Thanks!

1
Have you logged in as Admin ? or are you a different User ?Kedarnag Mukanahallipatna
Please edit your question with the actual command that you are using and the type of key pair that you are trying to create.John Hanley
What do you mean by "my account has the AmazonEC2FullAccess role"? Do you mean that the AmazonEC2FullAccess policy is attached to the IAM User that you are using?John Rotenstein

1 Answers

2
votes

You will need to have ec2:CreateKeyPair & ec2:KeyPairName permissions assigned for resource ARN arn:aws:ec2:*:*:key-pair/*.