Join GitHub today
Support for asynchronous lambda invocation with integration type AWS #5898
What did you implement:
How did you implement it:
How can we verify it:
service: env-test provider: name: aws runtime: nodejs6.10 functions: lambda: handler: index.handler events: - http: path: users method: post async: true
Didn't test with real AWS API GW. Expected beheviour would that it return HTTP 202.
Is this ready for review?: YES
Thanks for jumping on this @snurmine ... From the checklist above, it seems that this PR is ready for review, however it seems that the documention is missing. Could you add that?
Could you test it with real AWS API GW? :) ... Unit tests are great, but we can't merge anything that is untested manually.
It seems that it return before sleep is done, because it respons less than 1s.
@snurmine works great. One more feedback though, don't you think it'd be better UX if we config it like this:
functions: hello: handler: handler.hello events: - http: path: users/create method: get async: true # default is false
functions: hello: handler: handler.hello events: - http: path: users/create method: get integration: aws_async
This would give a nicer experience imo like we're doing with cors. It'd also match how you're validating it. What you think?
Could be, since integration refers to aws apigw integration types(mock, lambda etc.). Only thing is that, maybe the feature is not so helpful. I wonder if something like adding custom headers in general, would be more beneficial. Then adding giving custom header and setting integration type to "lambda"(or what allows customs mapping) would give same effect.
pmuens left a comment •
Great job @snurmine
I just looked through this and it looks good so far. The only thing I don't understand right now is that we're providing 2 ways to configure it (at least as far as I understand it). There's
Is it possible that we reduce this to only one config option? I'd vote for
Do we need both? It seems like
Because of that
Mar 21, 2019
1 check passed
Glad to see someone took this on and finished it!
Cloudformation might fail for integration types that don't support adding
Increasing the timeout over 30 seconds on an async lambda throws a warning like
Shouldn't the warning be suppressed for async lambdas?