Process Amazon SQS messages with AWS Lambda

Poll one message at a time and remove it only after the function acknowledges the same message ID.

8 stepsProduct and engineering

Free to start, no card required.

How it works

  1. When this happens

    Poll the work queue

    Schedule

  2. Step 1 · Code

    Set the queue URL

  3. Step 2 · Amazon SQS

    Receive one queue message

  4. Step 3 · Code

    Read the message and receipt

  5. Step 4

    Check for a message

    Follows the first path that matches

    • Message received

      1. Step 5 · AWS Lambda

        Process the message in Lambda

      2. Step 6

        Check the function acknowledgment

        Follows the first path that matches

        • Same message acknowledged

          1. Step 7 · Amazon SQS

            Remove the acknowledged message

        • Otherwise

          Nothing happens

    • Otherwise

      Nothing happens

Before you start

Set the queue URL and choose a Lambda function that accepts messageId and body, handles repeated IDs and returns processedMessageId on success. Set the queue visibility timeout above the maximum processing time and configure its dead-letter queue.

Accounts to connect

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template