@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...
What is the error about?
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 <https://lambda.us-west-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:us-west-1:########:function:freshdeps-lookup-test/invocations>
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]