1 Answer
- Newest
- Most votes
- Most comments
1
If by "same lambda function" you mean the same invokation of a function, then no. But you could trigger a different invokation of the same function for this different purpose. Usually though you would trigger a different function for better code structure and least-privilege security configuration. Either way it sounds like you might want to share state between invokations - DynamoDB is a common way to do it.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
Thanks @skinsman.
Yes, trigger different invokation of the same function seems the solution. The next problem, in this approach, could be: how can I hold the context that invoke firstly the Lambda function in order to give a response to it when I receive the second trigger?
I mean, how can I keep the http connection alive, and reuse after second trigger?