Socket
Socket
Sign inDemoInstall

@aesop-fables/triginta

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aesop-fables/triginta

A lightweight framework that wraps the basic infrastructure usages of AWS Lambda (SQS, Kinesis, etc.).


Version published
Weekly downloads
36
decreased by-86.52%
Maintainers
2
Weekly downloads
 
Created
Source

@aesop-fables/triginta

triginta is a lightweight framework that wraps the basic infrastructure usages of AWS Lambda (SQS, Kinesis, etc.). For APIs, see our API framework. It aims to conventionalize logging, error handling, and X-Ray integration.

Installation

npm install @aesop-fables/triginta
yarn add @aesop-fables/triginta

Supported Lambdas

The following can be created via the ILambdaFactory interface:

  1. SQS Lambdas (createSqsLambda)
  2. S3 Lambdas (createS3Lambda)
  3. Kinesis Lambdas (createKinesisLambda)

Known issues

We're missing unit tests, logging, error handling, middleware support, and X-Ray integration. This will all come soon - I just wanted to get the basic structure published.

Example

// index.ts
interface MyQueuedMessage {
  message: string;
}

class MyLambda implements IHandler<MyQueuedMessage> {
  async handle(message: MyQueuedMessage): Promise<void> {
    console.log('HELLO, WORLD!');
    console.log(JSON.stringify(message, null, 2));
  }
}

// obviously you need to register all of your stuff
const container = bootstrap();
// triginta doesn't depend on containr but it abstracts out the creation of your handler
// so that you can easily plug it in (see the `factory` property)
const lambdaFactory = container.get<ILambdaFactory>();

export const handler = lambdaFactory.createSqsLambda<MyLambda>({
  factory: () => container.get<MyLambda>('lambda'),
});

FAQs

Package last updated on 08 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc