Registry / devops / sqs-dlq-monitoring

sqs-dlq-monitoring

JSON →
library2.2.0jsnpmunverified

An AWS CDK construct that creates an SQS queue with a monitored dead-letter queue (DLQ) and sends notifications via email or Slack when the DLQ message count exceeds a threshold. Current version: 2.2.0. Built on AWS CDK v2 (aws-cdk-lib ^2.168.0) and constructs ^10.5.1. Key differentiator: provides an all-in-one solution combining SQS queue provisioning, DLQ setup, CloudWatch alarm, and notification integration (email/Slack) without manual configuration. Maintained by EYssel.

npm install sqs-dlq-monitoring
INSTALL
IMPORT
SIG · SQS-DLQ-MONITORING
S
sqs-dlq-monitoring
devopsjavascriptv2.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MonitoredQueue
import { MonitoredQueue } from 'sqs-dlq-monitoring'
Main construct class. ESM only; CommonJS require is not recommended but may work if the package supports CJS.
EmailProvider
import { EmailProvider } from 'sqs-dlq-monitoring'
import { EmailProvider } from 'sqs-dlq-monitoring/dist/email'
EmailProvider is exported from the main package entry point; do not try to import from subpaths.
SlackProvider
import { SlackProvider } from 'sqs-dlq-monitoring'
import { SlackProvider } from 'sqs-dlq-monitoring/dist/slack'
SlackProvider is exported from the main package entry point; do not use subpath imports.

Creates an SQS queue with DLQ monitoring and email/Slack alerting in an AWS CDK stack.

import { Stack, StackProps } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { MonitoredQueue, EmailProvider, SlackProvider } from 'sqs-dlq-monitoring'; export class MyStack extends Stack { constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); new MonitoredQueue(this, 'MyMonitoredQueue', { queueProps: { queueName: 'my-queue', visibilityTimeout: Duration.seconds(300), }, maxReceiveCount: 5, messageThreshold: 10, evaluationThreshold: 1, messagingProviders: [ new EmailProvider(['admin@example.com']), new SlackProvider('xoxb-example-token', 'C0123456', 'MySlackApp'), ], }); } }
Debug
Known issues
breakingPackage requires aws-cdk-lib ^2.168.0 and constructs ^10.5.1, which may force upgrades in projects using older CDK versions.
fix
Upgrade aws-cdk-lib and constructs to meet peer dependency requirements.
affects: >=2.0.0
gotchaQueue props default deadLetterQueue may conflict with explicit dlqProps or custom deadLetterQueue in queueProps.
fix
Either rely on the construct's automatic DLQ creation and omit deadLetterQueue from queueProps, or use dlqProps to customize. Do not specify both.
affects: >=0.0.0
deprecatedOnly v2.x is supported; older versions (1.x) are not published or incompatible.
fix
Use npm install sqs-dlq-monitoring@^2.0.0.
affects: >=2.0.0
gotchaSlackProvider requires a Slack app with chat:write:bot scope and token must be securely stored, not hardcoded.
fix
Use AWS Secrets Manager or CDK parameters to pass Slack token securely.
affects: >=0.0.0
gotchaEmailProvider uses SNS topics; email subscriptions must be confirmed by recipients before notifications work.
fix
When deploying, check SNS subscription confirmations in AWS Console or use email endpoints that auto-confirm.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'sqs-dlq-monitoring' or its corresponding type declarations.
Package not installed or TypeScript resolution fails due to missing @types or misconfigured tsconfig.json.
fix
Run 'npm install sqs-dlq-monitoring' and ensure 'esModuleInterop' and 'moduleResolution' are set appropriately.
Property 'maxReceiveCount' is missing in type 'MonitoredQueueProps' but required in type
MonitoredQueueProps expects maxReceiveCount but it was omitted (default may not apply if not specified).
fix
Provide maxReceiveCount in the properties object.
SlackProvider: The provided token is not authorized to post to channel
Slack token lacks chat:write:bot scope or channel ID is incorrect.
fix
Recreate Slack token with correct scope and verify channel ID.
EmailProvider: Subscription confirmation required
SNS topic subscription for email requires endpoint confirmation.
fix
Check email inbox (including spam) and confirm subscription within 3 days.
Upgrade
Version history
2.2.0latest on npm
Audit
Dependencies
aws-cdk-librequiredPeer dependency: required for CDK constructs and cloud resources (SQS, CloudWatch, SNS).
constructsrequiredPeer dependency: required for CDK construct base class.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
sqs-dlq-monitoring — npm install sqs-dlq-monitoring · libregistry