Fork me on GitHub
#datomic
<
2021-12-04
>
Benjamin14:12:21

What is the easiest way to have 2 lambdas with api gateway? Currently I'm going to implement a single http-direct ion and put routing there. :integration :api-gateway/proxy from the example looks promising but I don't get: 1) what the endpoint for it is 2) if I need to configure something manual, because here it says "older versions" https://docs.datomic.com/cloud/ions/ions-reference.html#web-lambda-proxies

Benjamin13:12:23

ok I figured out that aws api gateway is kinda parallel to doing routing myself. I'm guessing there isn't really any preference on either or does anybody have experiences to share?

Jake Shelby23:12:13

It depends on what you're trying to accomplish - if you have several "prefix" routes, you can configure those in API gateway to go to different lambda ion handlers - API gateway can proxy everything to those prefixes, and your app can handle further nested routing from there. This is handy if you have a public part of your API and other parts that require different authentication from each other - API gateway will allow you to specify no authentication for one prefix, and specify a cognito pool authentication (for example) to another prefix; and then yet another authentication (like a lambda) for another prefix