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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠