Catalog npm
Back to packageRELEASE DETAILS

2.0.0

npm

@0xc/serverless-offline-aws-sqs

AWS SQS 📤 Plugin for Serverless Framework ⚡️| Webpack support | Local ElasticMQ

awselasticmqlambdalocalofflineserverlesssqs
Published11 Jun 2020
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

builds.sr.ht status License: MIT

serverless-offline-sqs

This Serverless-offline plugin emulates AWS λ and SQS queue on your local machine by using ElasticMQ. To do so, it listens SQS queue and invokes your handlers.

Installation

First, add @0xc/serverless-offline-aws-sqs to your project:

yarn add @0xc/serverless-offline-aws-sqs

Then inside your project's serverless.yml file, add following entry to the plugins section before serverless-offline (and after serverless-webpack if presents): @0xc/serverless-offline-aws-sqs.

plugins:
  - serverless-webpack
  - "@0xc/serverless-offline-aws-sqs"
  - serverless-offline

Configure

Functions

Ths configuration of function of the plugin follows the serverless documentation.

functions:
  mySQSHandler:
    handler: handler.default
    events:
      - sqs:
          queueName: MyQueue
          arn:
            Fn::GetAtt:
              - MyQueue
              - Arn
resources:
  Resources:
    MyQueue:
      Type: AWS::SQS::Queue
      Properties:
        QueueName: MyQueue

Inside your functions you could use a wrapper to switch between local and (aws) production environment.

const AWS = require("aws-sdk");

let options = {};

// connect to local ElasticMQ if running offline
if (process.env.IS_OFFLINE) {
  options = {
    apiVersion: "2012-11-05",
    region: "localhost",
    endpoint: "http://0.0.0.0:9324",
    sslEnabled: false
  };
}

const client = new AWS.SQS(options);

export default client;

Local SQS (ElasticMQ)

The configuration of aws.SQS's client of the plugin is done by defining a custom: serverless-offline-sqs object in your serverless.yml with your specific configuration.

You could use ElasticMQ with the following configuration:

custom:
  "@0xc/serverless-offline-aws-sqs":
    apiVersion: "2012-11-05"
    endpoint: http://0.0.0.0:9324
    region: eu-west-1
    accessKeyId: root
    secretAccessKey: root
    skipCacheInvalidation: false

Before you start your serverless functions you ElasticMQ needs to run.

docker run -it -p 9324:9324 s12v/elasticmq:latest

Queues will be automatically created.

Roadmap

  • install ElasticMQ automatically or start docker automatically

PLEASE HELP ME TO GET THIS DONE! EVERY PR IS WELCOME.

Credits

This is a custom fork from @meuschke/serverless-offline-aws-sqs Project

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aws-sdk
Environment
{
  "local_name": "aws-sdk",
  "alias": false,
  "peer_metadata": null
}
^2.271.1runtime
figures
Environment
{
  "local_name": "figures",
  "alias": false,
  "peer_metadata": null
}
^2.0.0runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.10runtime
serverless-offline
Environment
{
  "local_name": "serverless-offline",
  "alias": false,
  "peer_metadata": null
}
4.0.0runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-TpH4oDX1/H76xb4v/MXVrcAJGsmaVvFNYGn0s8F5iFmmxbjIt9isjl0NfXeZ01sqxzRCf81chGBaf8KnmvN9Fw==",
  "shasum": "34f059b19aa267a8afdbd5c7df5b0084f454757a",
  "tarball": "https://registry.npmjs.org/@0xc/serverless-offline-aws-sqs/-/serverless-offline-aws-sqs-2.0.0.tgz",
  "fileCount": 4,
  "unpackedSize": 15169,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4nBvCRA9TVsSAnZWagAAX0sP/iQCe8r123yxyPzt3vWl\ntFheBej45Um5pnhn3fOGBdgH5Ra9JC+zRpt5AdDiASLwNXbP1XrZmxPvGE3e\nAL66n7GeVYAaimmK94LGc3Xm2qjimLh5gQLsadgCN2tH1uPI+WzAudH3bYHH\n+yX0lNsJMq13R8tjFUxbD2sxIoxXweI2R11lCxp5mTqh5utqfycJt+vnb639\nIIg6dDKOJlGkMgnEE7utCLHZgeyGNRrO7B9K9q4rduBY6qlaqTQ8zMkeCMJo\n/Q0BNZRwF+gS/2yXR/2u4PnPmfAiaw4PY7N4cdJ1dgzuRq0RcdHN67i2L1S2\nzGDBDBlE16IlDofw/cnb2lNYyLMAaHXBwLLl/3umoem+Q9A/Fecv901Jb6Ro\nZEoHiat3uDWTalPktC0FlWsGfR3hTtezNpVIK8pKkOKiHNHHHPiAXGH+Yg17\nHtIDTmUdyCKN0fKhf8mGbuxEwBSO36IY+0i2EghQHgH95S2qeuG4cI3so8nK\nOhWCsje0rFCnSNH4veUPDfRmFJvmWXP6aBMrYE4e29bRThitEj2FlRLlKcWV\nuWVpX1nWwTcQcZNPUieGT4Fy8WK0GKNbxbwWcRre+lH7LmsAEhknKYF1SwhX\n+rfzlJEm+AxDAdOzEdjSTiYwSGKB3TmSk2bpMI1XmWFrjQ0ryAB4K2ZoMXmS\n7tbv\r\n=XOxs\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQD/r6rTiQ55KYm8247mugtcY3oJg4OqaBvbcdJ2xzFL8wIgC/xmAQhXsP7vJapi5GdXJ/JETm5QW/MxCDWPe0eNeO0="
    }
  ]
}

Repository

PENDING
meuschke/serverless-offline-aws-sqs

Shared repository data · GitHub

License detected in repository
Not collected

Repository

ACCESSIBLE
tcarrio/serverless-offline-aws-sqs

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
master
Last push
17 Oct 2020
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots21 Oct 2026
10.50
2026-10-21: 0 · observed 2026-10-21T12:54:46.3685866Z
21 Oct21 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2102026-10-21T12:54:46.3685866Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:8e70684b802a5c8cb8b22becf8ec5f60c4c8e1e2d584340487748c2cc2b7ff8a

Other collected versions

2.0.312 Jun2.0.212 Jun2.0.111 Jun1.2.311 Jun1.2.27 Feb1.2.17 FebView all collected versions →