AWS: How to retrieve a KeyPair private key

Note for myself, this is how you can download a copy of a KeyPair private key:

aws --region ca-central-1 ssm get-parameter --name /ec2/keypair/key-015b012fb114efc83 --with-decryption --query Parameter.Value --output text

Posted in Uncategorized

Leave a comment