aws-samples / api-gateway-secure-pet-store

Amazon API Gateway sample using Amazon Cognito credentials through AWS Lambda
Apache License 2.0
308 stars 113 forks source link

API Gateway and HTML Web pages #28

Open genifycom opened 7 years ago

genifycom commented 7 years ago

I have watched the Invent and other API gateway videos, read tons of stuff and I am still confused.

Imagine I have two EC2 websites. Each one serves up both webpages and API resources.

Can I use API Gateway to proxy both webpages and resources? i.e. one serves up HTML and the other JSON.

Right now if I create API Gateway resources for /site1 and /site2 and add a resource under each for HTTP Proxy to their respected locations and under the ANY method test something like /site1/index.html the webpage HTML is returned but all of the page content like scripts, css, js etc is not found.

I thought that API gateway was the answer to serverless proxying so have I got it completely wrong?

Thanks, Dave