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
gefragt vor 5 Monaten143 Aufrufe
1 Antwort
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
EXPERTE
Uri
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen