New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement async / await instead of Bluebird promises #26

jeremydaly opened this Issue Apr 3, 2018 · 1 comment


None yet
1 participant
Copy link

jeremydaly commented Apr 3, 2018

Node 8.10 runtime is now available in Lambda!

I'd really like to refactor to use async / await instead of Bluebird so that I can remove ALL dependencies from Lambda API. I think we're early enough into this project to to require the 8.10 runtime in our Lambda functions.

I'm currently using a Promise.each() to serialize middleware, so I'll need to figure out a new approach for that. However, this might create an opportunity to allow middleware to optionally process asynchronously. I'll have to think about this some more.

@jeremydaly jeremydaly added this to the v0.5 milestone Apr 6, 2018


This comment has been minimized.

Copy link

jeremydaly commented Apr 23, 2018

This has been implemented with v0.5. Turns out serializing the middleware was simple. I also removed a bunch of unnecessary placeholders for storing resolves and rejects for Promises. Since async/await uses promises internally, and there is no way to manually resolve an await, I used native promises to keep support for the next() callback in middleware. It essentially just creates the promise and waits for the callback to trigger a resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment