Proxy request path in AWS for Single Page App

212 views Asked by At

I'm building a single page app with an api backend. All of the static assets including html are hosted on s3 with static hosting turned on. Let's say the domain for the SPA is mydomain.com. Is there a way for me to forward all requests from mydomain.com/api/v1 to the ip address of my api backend, without setting up a dedicated proxy server?

1

There are 1 answers

0
Anton On

i think it's no possible. You have to set up web server that does follow:

  1. hosts the start page of SPA
  2. reverse proxy requests from API to ip address you need

and put all static content under separate domain (e.g. static.mydomain.com) and associate with S3