Search code examples
amazon-web-servicesrestaws-lambda

What is a stop for RestFul Stateless API?


I am using AWS Lambda to host code which fetches data from dynamodb.

The request comes from a client and inturn, the lambda queries and gets the data and sends it back as response.

Does this serve as end of a transaction?

Do we also check about if the response we sent back is consumed or not by the requestor ? If yes, how to go about it in Lambda when its stateless. ( if we need to change the code, and add step function to lambda, i'm still confused if the requestor automatically will send a 200 OK or we should query ?)


Solution

  • That is correct. Lambda returns the response and shuts down (this is good because you save money). If you are concerned about "exactly once delivery", consider using a message queue (eg: SQS, Kafka). Lambda will then publish to a topic and the requestor of data will subscribe to the topic.