An error occurred (ValidationException) when calling the ImportCertificate operation: The private key is not supported

Question:

I am using the AWS CLI in order to import a certificate to region us-east-1, like so:

This has worked in the past for other certs, however I recently started seeing the following error:

I have checked that the private key indeed matches the certificate via openssl, so I am quite lost as to what might be the issue here.

yields

What could be the issue?

Answer:

I just ran into this as well and found a hint elsewhere that suggested prefixing your file with “file://”. Worked for me. Give it a try:

Leave a Reply