While I am trying to upload ssl certificate with aws cli got error saying MalformedCertificate
I used following command to upload ssl certificate:
aws iam upload-server-certificate --server-certificate-name MysiteCertificate --certificate-body public.crt --private-key private.key --certificate-chain intermediate.pem
A client error (MalformedCertificate) occurred when calling the UploadServerCertificate operation: Unable to parse certificate. Please ensure the certificate is in PEM format.
After debugging for a while adding file:// before file name is solved issue & below is the command that worked for me:
aws iam upload-server-certificate --server-certificate-name MysiteCertificate --certificate-body file://home/guest/Downloads/mysite/public.crt --private-key file://home/guest/Downloads/mysite/private.key --certificate-chain file://home/guest/Downloads/mysite/intermediate.pem