Serverless Express Typescript Sqs

screenshot of Serverless Express Typescript Sqs
express

A starter kit for a serverless producer consumer queue setup implemented with Node.js

Overview

The serverless-express-typescript-sqs project is a robust starter kit designed for building serverless applications with a Producer-Consumer queue architecture using AWS Lambda and SQS. Its primary purpose is to streamline the process for developers to implement domain-specific logic on top of the provided base code. This setup allows for reliable message handling, ensuring that even if there are processing issues in the consumer, messages are kept in the queue for future processing.

This project leverages TypeScript and Node.js, providing an efficient and modern development environment. With features such as HTTP endpoints for message production and automatic triggers for message consumption, it is well-equipped for handling various error scenarios, making it a great choice for building resilient applications.

Features

  • Serverless Architecture: Utilizes AWS Lambda and SQS for a seamless experience without managing server infrastructure.
  • HTTP Endpoint for Message Production: Easily call endpoints to enqueue messages, making it straightforward to integrate into applications.
  • Automatic Message Consumption: Consumer functions are triggered automatically when messages are enqueued, streamlining workflow.
  • Error Handling Mechanism: Supports both retriable and non-retriable errors, ensuring messages are either retried or safely deleted as needed.
  • Dead Letter Queue: Messages that fail multiple times are moved to a Dead Letter Queue for further investigation without data loss.
  • TypeScript and Node.js: Built with modern technologies, providing type safety and a rich ecosystem for developers.
  • Validation and Testing: Implements request validation with Express Validator and includes Jest setup for unit testing, ensuring code quality.
  • Swagger UI Integration: Automatically generates interactive API documentation, making it easier to understand the service endpoints.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.