Skip to content

Zerverless/zdk

Repository files navigation

ZDK — Zerverless Development Kit

npm License: Apache 2.0 Built on AWS CDK

An opinionated L3 construct library on top of AWS CDK for building serverless systems faster — secure defaults, less boilerplate.

ZDK is developed by the Zerverless team and is fully open source, MIT/Apache-licensed, and independent of the private Zerverless platform — you can use it with zero relationship to Zerverless the company.

Why ZDK

Raw CDK L1/L2 constructs leave every IAM policy, timeout, memory size, and log retention decision to you. ZDK ships secure, sensible defaults for the serverless patterns you write over and over, with an overrides escape hatch when you need to deviate.

Install

npm install @zerverless/zdk aws-cdk-lib constructs

Quick start

import { ZerverlessApi, ZerverlessFunction, ZerverlessTable } from "@zerverless/zdk";

const table = new ZerverlessTable(this, "Orders", { /* ... */ });
const handler = new ZerverlessFunction(this, "CreateOrder", {
  entry: "src/create-order.ts",
  table,
});
new ZerverlessApi(this, "Api", {
  routes: { "POST /orders": handler },
});

See examples/basic-api for a full runnable stack.

Constructs

Construct Purpose
ZerverlessFunction Lambda with secure IAM defaults, tracing, and log retention pre-configured
ZerverlessTable DynamoDB table with sane defaults (PITR, encryption)
ZerverlessApi API Gateway HTTP API wired to ZerverlessFunction routes
ZerverlessQueueWorker SQS + Lambda consumer with DLQ and retry defaults
ZerverlessEventBus EventBridge bus + rule helpers

Full reference: docs/API.md.

Design philosophy

Decisions behind the defaults are recorded as ADRs in docs/design/ — start with 0001-l3-defaults-philosophy.md.

Relationship to Zerverless

ZDK is used internally by Xero (code generation) and Hero (pattern recommendations), and is fully usable on its own — it has zero dependency on zerverless-platform or any private Zerverless service, and never will.

Multi-language support

ZDK is written in TypeScript and structured to be jsii-compatible, so Python/Java/.NET bindings can be published later without a rewrite — this is why construct props avoid overly TypeScript-specific patterns (see CONTRIBUTING.md).

Contributing

See CONTRIBUTING.md. Please read CODE_OF_CONDUCT.md first.

Security

See SECURITY.md for how to report a vulnerability.

License

Apache License 2.0 — see LICENSE.

About

Zerverless Development Kit — L3 CDK constructs

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors