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.

asked 2 years ago343 views
1 Answer
2
Accepted Answer

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
EXPERT
answered 2 years 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