Running code after returning a response from an AWS Lambda function | Amazon Web Services
Briefly

Once you send the response from the function, the Lambda service freezes the runtime environment, and the function cannot run additional code. While you can delay returning the response to the client until all work is complete, this approach can negatively impact the user experience.
This blog explores ways to run a task that may start before the function returns but continues running after the function returns the response to the client.
Read at Amazon Web Services
[
add
]
[
|
|
]