-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
BEFORE SUBMITTING AN ISSUE CHECK THE FOLLOWING:
- I checked existing issues.
- This is not a support question (which can be answered on Slack).
- This issue is for Lambda (not the Web Client, API, or Bots)
FEATURE REQUEST
- Describe the feature you would like to see
Would be neat to support promises so we can use async logic in our events.
- Why you need it
See comments below
- How it should work
Something like this:
exports.handler = (event, context, callback) => {
// This is used to know how much time you have left for your code
const time_left = context.getRemainingTimeInMillis;
- callback(null, handleEvent(event, time_left));
+ Promise.resolve(handleEvent(event, time_left)).then(result =>
+ callback(null, result));
};Metadata
Metadata
Assignees
Labels
No labels