How can I schedule a lambda to be called with an array of events?

0

Hi! I'm fetching Odata entities and storing them to S3 with a fairly simple lambda. The source of Odata has 400k entries and fetching and storing 2k takes about 2min each, so I would expect a total of 200 minutes running time. Of source, the lambda times out after around 14k entries fetched and stored to S3.

I've implemented paging with $top and $skip in the function - is there a way I can schedule a chain of events to be sent to the lambda without creating 10-20 different EventBridge schedules with different event payloads?

perage
已提問 5 個月前檢視次數 143 次
1 個回答
0

Use Step Functions that call the Lambda function in a loop until the function returns that there are no more entries. If you know the params for invoking the functions up front, you can also use a Map state to iterate over these values and then you can run all of them in parallel.

profile pictureAWS
專家
Uri
已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南