npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sqs-sfn-dispatcher

v0.0.9

Published

CDK construct for dispatching messages from AWS SQS to Step Functions state machines.

Readme

SQS Step Functions Dispatcher

CDK construct for dispatching messages from AWS SQS to Step Functions state machines.

Problem

Integrating Step Functions with Amazon SQS can be done in one of the following ways:

  1. Create a task in state machine that retrieves messages from the queue before invoking processing logic.
  2. Use EventBridge Pipes to connect queue with the state machine using Map state to process batched messages.

Either way, the state machine processing SQS messages can not not be focused purely on the business logic.

Solution Architecture

Diagram

The solution uses a singleton Lambda function that retrieves messages from the queue and forwards them to the dispatcher state machine. Then the state machine processes messages in parallel, sending each message to the target state machine and deletes successfully processed messages.

Usage

import { SqsStepFunctionsDispatcher } from "sqs-sfn-dispatcher";

// Create a dispatcher that connects your SQS queue to your Step Function
const dispatcher = new SqsStepFunctionsDispatcher(this, "MyDispatcher", {
  source: myQueue,
  target: myStateMachine,
});

Working with FIFO Queues

Important: The SQS-SFN Dispatcher automatically sets the batch size to 1 for FIFO queues to preserve message group ordering. This ensures that:

  1. Only one message per group is processed by lambda
  2. If a message fails processing, subsequent messages with the same group d will not be processed until the failed message is successfully processed

Also, don't use DLQs with FIFO queues if the order of operations is critical for your application. When a message moves to a DLQ, the queue continues processing the next message in the group, breaking the ordering guarantee.

License

This project is licensed under the Apache License 2.0.

Copyright 2023. All rights reserved.