Fork me on GitHub
#aws
<
2018-10-10
>
Joe Lane16:10:39

@polymeris I you’re going to do this please don’t make Node a requirement. There are a TON of scenarios where you would want to call aws from the browser directly. I’ve got a PoC calling an aws lambda from the browser, no apigateway or webserver in sight.

polymeris17:10:59

Hmm, interesting The cljsjs.aws-sdk-js I am depending on for the exerns already brings in the browser build of the SDK (which is apparently different from the node build). It would be a matter of switching to using the correct AWS object in the browser.

polymeris17:10:38

My use case is calling this from lambdas, so I haven't really given that much thought.

mj_langford17:10:30

As a countercase: I would take an API that requires node. I think node is a better lambda backend than clojure on java due to startup times

Joe Lane17:10:55

In practice I havent found the java startup times to be an issue.

Joe Lane17:10:57

@polymeris That library hasn’t been updated in a very long time. I ended up manually writing a foreign libs file because the sdk uses modules 3 levels deep and cljs has trouble requiring them (i believe because its not a valid symbol)

polymeris18:10:36

Well, the unit test work in the browser if I just replace (nodejs/require "aws-sdk") with js/AWS, so that gives me some hope that we can support both

Joe Lane18:10:22

Cool! Great to hear!

polymeris19:10:50

What's the best way to end-to-end test if it works in the browser? Do I have to create a cognito pool?

Joe Lane14:10:12

Yeah, cognito identity pool.