# @janiscommerce/aws-listeners

> A Package to implement lambda listeners for every AWS Service events

Latest version **2.1.0** (published 2026-10-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @janiscommerce/aws-listeners
pnpm add @janiscommerce/aws-listeners
yarn add @janiscommerce/aws-listeners
bun add @janiscommerce/aws-listeners
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2026-10-08 |
| First published | 2020-06-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 5 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Janis |
| Maintainers | janiscommerce |

## Links

- npm: https://www.npmjs.com/package/@janiscommerce/aws-listeners
- Repository: https://github.com/janis-commerce/aws-listeners
- Homepage: https://github.com/janis-commerce/aws-listeners.git#readme
- Issues: https://github.com/janis-commerce/aws-listeners/issues
- npm.io page: https://npm.io/package/@janiscommerce/aws-listeners

## Dependencies (5)

- [lllog](https://npm.io/package/lllog.md) ^1.1.2
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.1147.0
- [@janiscommerce/log](https://npm.io/package/@janiscommerce/log.md) ^5.1.1
- [@janiscommerce/events](https://npm.io/package/@janiscommerce/events.md) ^0.2.0
- [@janiscommerce/superstruct](https://npm.io/package/@janiscommerce/superstruct.md) ^1.2.2

## Recent versions

- 2.1.0 (latest) — 2026-10-08
- 0.1.0-beta.0 (beta) — 2020-06-22
- 2.0.0 — 2023-07-24
- 1.0.0 — 2020-08-12

## README

# aws-listeners

![Build Status](https://github.com/janis-commerce/aws-listeners/workflows/Build%20Status/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/janis-commerce/aws-listeners/badge.svg?branch=master)](https://coveralls.io/github/janis-commerce/aws-listeners?branch=master)
[![npm version](https://badge.fury.io/js/%40janiscommerce%2Faws-listeners.svg)](https://www.npmjs.com/package/@janiscommerce/aws-listeners)

A Package to implement lambda listeners for some AWS Service events

## Installation
```sh
npm install @janiscommerce/aws-listeners
```

## Usage
```js
const { SQSListener, ServerlessHandler } = require('@janiscommerce/aws-listeners');

class SomeSQSFunction extends SQSListener {

	async process() {
		// process the message
	}
}

module.exports.handler = (...args) => ServerlessHandler.handle(SomeSQSFunction, ...args);
```
## Supported AWS Services

- **`SQS`** Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications.
- **`S3`** Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.
- **`SNS`** Amazon Simple Notification Service (SNS) is a highly available, durable, secure, fully managed pub/sub messaging service that enables you to decouple microservices, distributed systems, and serverless applications.

## Common method
There is one common method that must be implemented in all the listeners:

### async process()
This method is required, and should have the logic of your Listener.

## Extended documentation
For a more detailed explanation you can go to the following documents

- **[S3](docs/s3-listener.md)**
- **[SNS](docs/sns-listener.md)**
- **[SQS](docs/sqs-listener.md)**

## Examples

### S3 Listener

```js
'use strict';

const { S3Listener, S3ServerlessHandler } = require('@janiscommerce/aws-listeners');

class MyS3EventListener extends S3Listener {

	async process() {
		const data = await this.getData();
		/* ... Your code to process the s3 event goes here ... */
	}

}

module.exports.handler = (...args) => S3ServerlessHandler.handle(MyS3EventListener, ...args);
```

---
_Source: https://npm.io/package/@janiscommerce/aws-listeners · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
