Cannot create key pair for ec2 instance.

0

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

質問済み 1年前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
エキスパート
回答済み 1年前
profile picture
エキスパート
レビュー済み 1年前
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
回答済み 1年前
  • 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
エキスパート
回答済み 1年前
  • I recently resolved this issue, but I highly appretiate your help and assistance with my problem. Very stupid mistake...

0

Enter image description here

回答済み 1年前
0

Enter image description here

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ