- Newest
- Most votes
- Most comments
Retrieving the records from the stream yourslef is challenging. You will need to be able to read from the different shards (and their number might change). You need to checkpoint your location. You need to handle function timeouts (if it takes longer than 15 minutes to read all records from the previous invocation) and more.
Given the Lambda payload size limit (6 MB), I do not think that the function just reads the records and returns them to the 3rd party, unless the 3rd party knows how to invoke the function multiple times until it returns all the data.
You also mentioned that you can't loose data. There may be cases in which teh 3rd party will not invoke the function in time (maybe the 3rd party is down, network issues, etc.). As the retention in DDB stream is 24 hours, you may loose data.
For the above reasons I would recommend that you use the DDB streams event source for Lambda, and let the Lambda process the records, or store them in an interim location (S3, SQS, etc.). Then the 3rd party can reads the data from there.
Relevant content
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
