Skip to content

ECS Service in SSH Key pair does not get key automatically.

0

In the ECS Service, creating a cluster with an SSH key pair does not automatically get a key. After reloading several times, no key pairs are displayed. When I attempted to create a new SSH key pair, it still did not appear. This may be a bug. ! I'm using Edge Browser.

Currently, I have three keys. Key Images

Scanning Keys: Scan Key Images

After Scanning Keys: Not DisplayingnQ8mTFEshgC9OUA)

2 Answers
0

This issue might be related to IAM permissions rather than a browser or service bug. When creating an ECS cluster with EC2 instances and attempting to create or use SSH key pairs, you need specific IAM permissions for both ECS and EC2 services.

Based on your description, it appears that your user might be missing the necessary EC2 permissions to list or create key pairs, specifically the ec2:CreateKeyPair permission. Even though you have permissions to use Amazon ECS, when deploying containers on EC2 instances with SSH access, your user also needs certain EC2 service permissions.

To resolve this issue:

  1. Check if your IAM user or role has the ec2:CreateKeyPair permission
  2. If not, have an administrator add this permission to your IAM policy
  3. Following the principle of least privilege, only the specific EC2 actions required for your ECS workflow should be added

After updating the permissions, try refreshing the page and creating the key pair again. The existing key pairs should then be visible in the dropdown, and you should be able to create new ones as needed.
Sources
Five troubleshooting examples with Amazon Q | AWS DevOps & Developer Productivity Blog

answered 9 months ago
0

Ensure your key pairs are in the same region as your ECS Cluster and you select them from the drop down list

EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.