- Newest
- Most votes
- Most comments
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:
- Check if your IAM user or role has the
ec2:CreateKeyPairpermission - If not, have an administrator add this permission to your IAM policy
- 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
Ensure your key pairs are in the same region as your ECS Cluster and you select them from the drop down list
Relevant content
- asked a year ago
- asked 5 years ago
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
