I can't find callback parameter in python lambda handler

前端 未结 1 599
后悔当初
后悔当初 2021-01-19 09:51

I\'m studying for aws lambda - lex and I found coffee bot sample code with node.js.

// --------------- Main handler -----------------------
// --------------         


        
相关标签:
1条回答
  • 2021-01-19 10:17

    Using callbacks is a pattern commonly-used in NodeJS for managing asynchronous execution. You don't need it in Python (for this specific use-case).

    This snippet in NodeJS...

    callback(null, response)
    

    is equivalent to

    return response
    

    in Python.

    0 讨论(0)
提交回复
热议问题