Search code examples
amazon-web-servicesamazon-s3amazon-cloudfront

AWS - cannot access S3 bucket via HTTPS endpoint due to location constraint


The following services are activated:

  1. a S3 bucket in ap-east-1 where my static web pages are saved,
  2. a domain name registered on Route 53,
  3. a SSL certificate requested via Certification Manager at us-east-1,
  4. a CloudFront distribution for enabling HTTPS access to my web pages.

It is stated in this page that a single SSL certificate should suffice if CloudFront is used.

When I navigate to my URL https://www.example.com in Chrome, the following error is returned.

error_msg

How to make my pages globally accessible via HTTPS?


Update

It seems that the behavior of S3 buckets in ap-east-1 is different from the buckets located in other regions as stated in my follow up question.


Solution

  • It is saying that the URL provided for S3 included the wrong (or no) region.

    You should use the format:

    bucket-name.s3.region.amazonaws.com
    

    You are probably missing the region.

    See: Using Amazon S3 Origins, MediaPackage Channels, and Custom Origins for Web Distributions - Amazon CloudFront