I want to:
How do I accomplish this?
In route 53, from what I understand I can only point to one cloudfront distribution, so I am choosing my S3/CloudFront enabled bucket.
So, the end result should be, in order of priority/mapping:
In what way can I achieve this? And if not, what are my alternatives since I need to bend to the same origin principle requirement in web browsers.
Therefore, it's a best practice to place the CloudFront Distribution in front of the API Gateway and then enable protection on that distribution. Caching definitely could be a reason to use CloudFront with API Gateway.
API gateway serves as the actual HTTP(s) based API. CloudFront, Fastly or any modern CDN can cache requests to that API.
Yes, it is possible to use a Cloudfront distribution using a registrar other than AWS without a Route53 public hosted zone. You don't need Cloudflare to do it. You can create an Alias record with the subdomain and target in your registrar's control panel. The target would be something like dabcxyz.cloudfront.net.
Both cloudfront and Route53 have different purpose. Route 53 is a DNS service whereas Cloudfront is CDN service to serve static (and dynamic) content. You can use the cloudfront with Route 53 Geolocation Routing .
You would setup CloudFront with two origins, S3 and API Gateway, and configure CloudFront to use the API Gateway origin for all requests that start with /v1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With