ssh-key upload using awscli v2
Closed this issue · 1 comments
kniec commented
Just a small update on the “Using Spot Instances with EKS” lab.
On the “Create an SSH key page”:
https://ec2spotworkshops.com/using_ec2_spot_instances_with_eks/prerequisites/sshkey.html
Now that we have AWS CLI 2.0 the command to upload the public key to AWS fails:
aws ec2 import-key-pair --key-name "eksworkshop" \
--public-key-material file://~/.ssh/id_rsa.pub
will generate an error Invalid base64
The command needs a minor tweak to work:
aws ec2 import-key-pair --key-name "eksworkshop" \
--public-key-material fileb://~/.ssh/id_rsa.pub” will work as desired.
Simply changing file://
to fileb://
is all it takes.
Worth updating as this caught out everyone and had us stuck for about 15 minutes. Not fun with 20 customers in a virtual event J
Cheers,
Greg