This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-27
Channels
- # aws (3)
- # aws-lambda (8)
- # bangalore-clj (1)
- # beginners (155)
- # boot (13)
- # cider (88)
- # cljs-dev (3)
- # cljsrn (9)
- # clojure (120)
- # clojure-india (1)
- # clojure-italy (2)
- # clojure-norway (1)
- # clojure-romania (2)
- # clojure-russia (41)
- # clojure-spec (4)
- # clojure-uk (34)
- # clojurescript (68)
- # core-logic (16)
- # cursive (11)
- # data-science (9)
- # datomic (19)
- # dirac (6)
- # duct (20)
- # emacs (7)
- # events (2)
- # figwheel (4)
- # fulcro (12)
- # graphql (1)
- # hoplon (68)
- # klipse (1)
- # leiningen (7)
- # lumo (11)
- # off-topic (9)
- # onyx (114)
- # pedestal (4)
- # protorepl (15)
- # re-frame (60)
- # reagent (3)
- # ring (18)
- # shadow-cljs (15)
- # spacemacs (82)
@valtteri you were right about the environment variables. By setting them all as you did, I can now revert to the current versions of those dependencies. So thanks for that. Next problem is some exception is thrown by my lambda any time I try to invoke it via the console...
And via console do you mean the AWS browser web interface ‘console’ or command line?
In the AWS lambda web console the log output is
nth not supported on this type: Character: java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException: nth not supported on this type: Character
at clojure.lang.RT.nthFrom(RT.java:947)
at clojure.lang.RT.nth(RT.java:897)
at ring_aws_lambda_adapter.core$interpolate_path$_interpolate_path__4227.invoke(core.clj:12)
Where locally the same app runs in jetty. I’m following this (sort of) as my guide. What’s frustrating is none of my logging is invoked so I can’t even see what the request was. So e.g. “interpolate-path” is interpolating what?
sorry - the guide I’m following is thi shttps://github.com/langford/clj-aws-lambda-example
@valtteri I’m pretty fed up with this. Things I’ve done: (1) raise the memory allocation for the lambda to 1536MB, (2) make sure I have AOT enabled in the uberjar profile, (3) build and test the uberjar locally using curl [WORKS], (4) deploy the lambda and test it via the AWS Lambda web console [FAILS], (5) test via the AWS API gateway web interface “/{proxy+}” [FAILS]
via the API gateway the failure is the same unsupported operation exception, here’s the log for that (with account ids and keys elided):
Fri Oct 27 18:54:54 UTC 2017 : Endpoint request body after transformations: {"resource":"/{proxy+}","path":"/","httpMethod":"POST","headers":null,"queryStringParameters":{"f":"g"},"pathParameters":null,"stageVariables":null,"requestContext":{"path":"/{proxy+}","accountId":"########","resourceId":"########","stage":"test-invoke-stage","requestId":"test-invoke-request","identity":{"cognitoIdentityPoolId":null,"accountId":"########","cognitoIdentityId":null,"caller":"########","apiKey":"test-invoke-api-key","sourceIp":"test-invoke-source-ip","accessKey":"########","cognitoAuthenticationType":null,"cognitoAuthenticationProvider":null,"userArn":"arn:aws:iam::########:user/adminuser","userAgent":"Apache-HttpClient/4.5.x (Java/1.8.0_144)","user":"########"},"resourcePath":"/{proxy+}","httpMethod":"POST","apiId":"########"},"body":"h=i","isBase64Encoded":false}
Fri Oct 27 18:54:54 UTC 2017 : Sending request to
Fri Oct 27 18:54:54 UTC 2017 : Received response. Integration latency: 75 ms
Fri Oct 27 18:54:54 UTC 2017 : Endpoint response body before transformations: {"errorMessage":"nth not supported on this type: Character","errorType":"java.lang.UnsupportedOperationException","stackTrace":["clojure.lang.RT.nthFrom(RT.java:947)","clojure.lang.RT.nth(RT.java:897)","ring_aws_lambda_adapter.core$interpolate_path$_interpolate_path__4227.invoke(core.clj:12)","clojure.core.protocols$fn__6753.invokeStatic(protocols.clj:152)","clojure.core.protocols$fn__6753.invoke(protocols.clj:124)","clojure.core.protocols$fn__6710$G__6705__6719.invoke(protocols.clj:19)","clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)","clojure.core.protocols$fn__6732.invokeStatic(protocols.clj:75)","clojure.core.protocols$fn__6732.invoke(protocols.clj:75)","clojure.core.protocols$fn__6684$G__6679__6697.invoke(protocols.clj:13)","clojure.core$reduce.invokeStatic(core.clj:6545)","clojure.core$reduce.invoke(core.clj:6527)","ring_aws_lambda_adapter.core$interpolate_path.invokeStatic(core.clj:12)","ring_aws_lambda_adapter.core$interpolate_path.invok [TRUNCATED]