AWS Route 53 integration with Cloudfront error (403)
Adding additional information regarding the two answers above.
As described in How do I resolve the error "The request could not be satisfied. Bad Request" from Amazon CloudFront :
This error message "The request could not be satisfied. Bad Request." is from the client and the error can occur due to one of the following reasons:
1) The request is initiated over HTTP, but the CloudFront distribution is configured to allow only HTTPS requests.
2) The requested alternate domain name (CNAME) isn't associated with the CloudFront distribution.
Solution for #1:
Open the Amazon CloudFront console -> Select the relevant distribution ->
Go Behaviors view -> Choose the behavior that matches the request and Edit ->
Then select in the Viewer Protocol Policy between the options of: HTTP and HTTPS
or Redirect HTTP to HTTPS
.
Solution for #2:
Since this release when you add an alternate domain name to a distribution, you must also attach a SSL/TLS certificate to that distribution that covers the alternate domain name.
So, first of all make sure that you do the following before you update your distribution to add an alternate domain name:
A) Register the domain name with domain provider (GoDadday, CloudFlare, Route 53 etc').
B) Add a certificate from an authorized certificate authority (for example - Let's Encrypt) to CloudFront that covers the domain name you plan to use with the distribution, to validate that you are authorized to use the domain. (Read more in here).
And only then:
Open Amazon CloudFront console -> General view -> Edit -> Alternate Domain Names (CNAMEs) -> enter the CNAME that you want to associate with the CloudFront distribution (for example www
or home
).
Looks like you are trying http instead of https.
If you have enabled http, then it means the destination method or path cannot be reached.
Solved, my problem was related to unassigned Alternate Domain Names (CNAMEs) for the CloudFront Distribution.