I\'m trying to associate a custom SSL certificate with Cloudfront. I uploaded it to IAM with the cert, privatekey, and chain. I gave it an upload path of /cloudfront.
<
Also got this error, and spent more time than I'd like trying to work out why it was failing (key size over 2048, cert chain etc).
I was attempting to use an IAM cert when creating the distribution through Terraform (specifying iam_certificate_id). Having looked at the AWS web interface for creating a distribution, there's no option to enter IAM cert Id, and it appears to only allow ACM certs. Has support for IAM certificates now been dropped (doesn't seem to be available on AWS console)?
When using ACM cert instead of IAM cert it worked fine for me.