So, I've used things like Route 53 before. I have a project now where there will be a website that is served over static pages but uses Javascript to hit an API. The static pages are stored in S3 cached behind cloudfront, the api is an API gateway tied to some backend logic.
How can I make it so www.site.com points to the cloudfront-attached S3 instances, but www.site.com/api/ redirects to my api? Is this even possible?
If instead of www.site.com/api
you used api.site.com
or some similar subdomain, you wouldn't need to point a CF distribution at the APIGW API.
APIGW is already fronted by a CF distribution; the Custom Domain Name feature allows you to import an SSL Cert which is attached to the existing CF distribution. Then APIGW provides the domain name of the CF distribution so you can configure a subdomain record like api.site.com
to point at it.
http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html