apex / up

Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.
https://up.docs.apex.sh
MIT License
8.78k stars 374 forks source link

Proxy support #80

Open tj opened 7 years ago

tj commented 7 years ago

Add proxy support as alternative to redirect in up.json

arxpoetica commented 5 years ago

We talked about this over in Slack, but just thought I'd add a few helpful links as you decide on this. ☺️

  1. AWS blog/news of both lambda and http proxy examples
  2. Getting Started: build an http proxy integration
  3. Some discussion on a Reddit thread

Here's my use case. I have an ec2 instance (which may need loadbalancing and autoscaling) to sit behind an /api path, seperate from lambda. As you mentioned in the thread, I could set up a Node proxy server. It might actually be better to something like that (or nginx) for performance reasons.

Admittedly on the fence.

I think I can get around this all for now by just using a subdomain (api.*), but that's not attractive to me in the long run, as I want this all to sit on the same domain.

I'm a total n00b when it comes to devops, and it may just be that I need to hunker down and learn this stuff elsewhere. But I welcome any thoughts.