Third party integration with SQS and Lambda

0

Hi. When a user is created, I must also create it in a third-party service and ensure that it is created. Then, I send it to SQS, which triggers a Lambda responsible for doing the integration. This lambda makes about 5 different http requests that depend on each other (I need the payload of the response from the first to execute the second call).

However, if any request fails, I must ensure that the message gets back on the queue and what was done is not done again next time. So, to save the state and separate the calls into steps, I'm thinking of saving this data in DynamoDB and retrieving it when necessary, but I don't believe it's the best solution. Has anyone faced something similar or have any ideas?

Thank you so much.

1回答
2
承認された回答

For orchestration across multiple lambda functions, you should look at using Step Functions - https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html

The following workshops can help you familiarize yourself with how Step Functions work - https://catalog.us-east-1.prod.workshops.aws/workshops/9e0368c0-8c49-4bec-a210-8480b51a34ac/en-US

Another example of how you can orchestrate using Step Functions can be found here - https://docs.aws.amazon.com/step-functions/latest/dg/sample-lambda-orchestration.html

profile pictureAWS
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ