When I was adding the IamCertificateId property to my AWS::CloudFront::Distribution in CloudFormation, I got the following error:
Resource handler returned message: "Invalid request provided: The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain."
I did make sure that the certificate exists, by running the aws iam list-server-certificates command and making sure the value of the IamCertificateId property matches the ASCA prefixed IAM ID of the certificate.
I am disregarding the us-east-1 region message since IAM is a global service and I'm not using an ACM certificate. Also, I'm operating in the China cn-north-1 region, in case that makes a difference.
I'm pretty sure the certificate is "valid", because I'm assuming AWS wouldn't have allowed me to upload the certificate with aws iam upload-server-certificate if it were malformed.
The error message, therefore, isn't pointing me to the solution. What could I be missing?