Cannot create key pair for ec2 instance.

0

It throws this error: You are not authorized to perform this operation. Encoded authorization failure message:

질문됨 일 년 전443회 조회
5개 답변
1

Is the permission to create key pairs attached to your IAM user, etc.?
If ec2:CreateKeyPair is not attached to the IAM policy, an error will occur.
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html

profile picture
전문가
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
0

Log in to the AWS Management Console and navigate to the IAM service. Select the relevant user for whom you want to add the policy. Click on the "Permissions" tab. Click on the "Add permission" button. On the next page, select the option "Attach existing policies directly". In the search bar, type "CreateKeyPair" and select the policy from the list of results. Review the policy details and click on the "Add permissions" button to attach the policy to the user. Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

profile picture
답변함 일 년 전
  • I have always given EC2FulAccess and there were no problems, but now. I don't have that ec2:CreateKeyPair policy I will attach 2 screenshots below

0

Hi. What you have attached is ECSFullAcess(not EC2FullAccess) and it seemes no ec2:CreateKeyPair action included on it.

https://docs.aws.amazon.com/AmazonECS/latest/userguide/security-iam-awsmanpol.html

profile picture
전문가
답변함 일 년 전
  • I recently resolved this issue, but I highly appretiate your help and assistance with my problem. Very stupid mistake...

0

Enter image description here

답변함 일 년 전
0

Enter image description here

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠