Skip to content

The template for creating a lambda orchestrator which consume events from AWS SQS

Notifications You must be signed in to change notification settings

GeekEast/create-typescript-lambda-orchestrator

Repository files navigation

create-typescript-lambda-orchestrator

no image found

Customize

  • search create-typescript-lambda-orchestrator globally and replace with whatever you like as your project name
  • search lambda-orchestrator-queue globally and replace with whatever you like as local queue name

Start

# install deps
pnpm install
# start localstack
pnpm stack up
# start serverless (lambda function)
pnpm dev
# send a test event to eventBus
pnpm stack event:send

Register Tasks

  • add a new event type in src/constant.ts under REGISTERED_EVENT_TYPE enum.

no image found

  • add a <taskName>.task.ts under src/tasks following sample.task.ts with the new register event type as the Dependency Injection Token.

no image found

  • add export * from "./<taskName>.task.ts" in src/tasks/register.ts

no image found

  • If you want to send a local event to test, please update DetailType: "SAMPLE_EVENT" in local/sendEvent.js to the new registered event type.

no image found

About

The template for creating a lambda orchestrator which consume events from AWS SQS

Topics

Resources

Stars

Watchers

Forks