How do you structure sequential AWS service calls within lambda given all the calls are asynchronous?

后端 未结 8 836
暗喜
暗喜 2021-02-02 14:35

I\'m coming from a java background so a bit of a newbie on Javascript conventions needed for Lambda.

I\'ve got a lambda function which is meant to do several AWS tasks i

8条回答
  •  忘掉有多难
    2021-02-02 15:24

    Just saw this old thread. Note that future versions of JS will improve that. Take a look at the ES2017 async/await syntax that streamlines an async nested callback mess into a clean sync like code. Now there are some polyfills that can provide you this functionality based on ES2016 syntax.

    As a last FYI - AWS Lambda now supports .Net Core which provides this clean async syntax out of the box.

提交回复
热议问题