I stumbled across a small mistake when fetching ARNs for EC2 keypairs, the correct ARN pattern is :
arn:aws:ec2:REGION:ACCOUNT-ID:key-pair/KEY-ID instead of arn:aws:ec2:REGION:ACCOUNT-ID:key-pair/KEY-NAME.
This PR fixes this issue by using the KeyPairId returned by describe_key_pairs.
I stumbled across a small mistake when fetching ARNs for EC2 keypairs, the correct ARN pattern is :
arn:aws:ec2:REGION:ACCOUNT-ID:key-pair/KEY-ID
instead ofarn:aws:ec2:REGION:ACCOUNT-ID:key-pair/KEY-NAME
. This PR fixes this issue by using theKeyPairId
returned bydescribe_key_pairs
.