AWS: "Unable to parse certificate. Please ensure the certificate is in PEM format."

marekful picture marekful · Mar 3, 2014 · Viewed 17.8k times · Source

I am trying to update a wildcard certificate for EC2 instances on AWS. The service these servers belong to consists of a single server and a set of servers behind AWS ELB.

The certificate has been successfully updated and verified on the single server.

The same is true for an instance pulled up from the image the ELB uses for AutoScaling.

However, when trying to add a new certificate to the load-balancer, I get the above error. I'm sure the certificate is correct and is in PEM format. I first tried via the web console, then using the aws aim command line tools with the same result.

Anyone came across similar issue recently?

Answer

magicgod picture magicgod · Apr 23, 2014

The AWS CLI requires file:// prefix for local files. For example file://private.key, file://cert_file, etc.