Advice with what services to use with Lambda for multi step reports.

0

Hello, I currently have a Lambda that is accessed by API gateway to run a report on one account. the Lambda accesses DynmoDB to generate this report. It will normally take about 1 or 2 seconds to run on most accounts but some larger ones can approach but not exceed 10 seconds. I’m now trying to run a once a week report on ALL accounts (1000s). So basically this function could be used across all accounts we have. I’m looking for some advice on what services to use to achieve this. Would this be a good use of a step function? Is it ok to use the step function to access the report API via API gateway or should it have some other means of calling the existing lambda?

Thanks for any help!

profile picture
Edward
asked 9 months ago177 views
1 Answer
1
Accepted Answer

Hi Edward,

Yes, Step Functions are made for what you want to achieve. To reduce time to completion, you should use Parallel map: https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-parallel-state.html You will be able to compute your reports in parallel and synchronize when everything is complete via the next step of the Step Function.

This post may help you best understand how to implement: https://aws.amazon.com/blogs/compute/implementing-patterns-that-exit-early-out-of-a-parallel-state-in-aws-step-functions/

Best,

Didier

profile pictureAWS
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions