Reputation:
I'm trying to upload my certificate using the aws command line tool. That's how I'm trying:
aws iam upload-server-certificate \
--server-certificate-name naosalvo.com \
--certificate-body file://naosalvo.crt \
--private-key file://naosalvo.key \
--certificate-chain file://naosalvo1-ca.pem \
--path /cloudfront/
And I'm receiving this error:
A client error (MalformedCertificate) occurred when calling the UploadServerCertificate operation: Unable to validate certificate chain. The certificate chain must start with the immediate signing certificate, followed by any intermediaries in order. The index within the chain of the invalid certificate is: -1
I can't figure it out what is the problem. And also, i have two pems:
naosalvo1-ca.pem
and naosalvo2-ca.pem
Shouldn't I upload both? How so?
Upvotes: 0
Views: 132
Reputation: 19548
You will need to figure out which order the chain certificates are suppose to be in and combine them into one file. The error you are receiving is due to not having all the chain certificates.
Upvotes: 1