Skip to main content

AWS CDK constructs for ZeroScaler.io

Project description

Zeroscaler CDK TypeScript Construct Library project

npm version PyPI version NuGet version Go project version TypeScript AWS CDK PRs Welcome License: MPL 2.0

Construct (Zeroscaler) which contains and deploys a lambda that boots up your Fargate application when there is an incoming request. It also monitors

The construct defines an interface (ZeroscalerProps) to configure the target group and Fargate task ARN, and optionally the VPC and ECS cluster.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests

Diagram of the Construct

flowchart TD
    A["Client"] L_A_B_0@-- HTTP Request --> B["Zeroscaler"]
    B -. Register Target .-> C["ELB Target Group"]
    B L_B_A_0@-- Serve HTML with refresh --> A
    C -- Health Check --> D["ECS Fargate"]
    D -- Boot --> E["Your Fargate Application"]
    A L_A_E_0@-- Refresh when booted --> E
    E L_E_A_0@-- Response --> A
    linkStyle 0 stroke:#00C853,fill:none
    linkStyle 1 stroke:#AA00FF,fill:none
    linkStyle 2 stroke:#00C853,fill:none
    linkStyle 3 stroke:#AA00FF,fill:none
    linkStyle 4 stroke:#AA00FF,fill:none
    linkStyle 5 stroke:#2962FF,fill:none
    linkStyle 6 stroke:#2962FF,fill:none
    L_A_B_0@{ animation: fast }
    L_B_A_0@{ animation: fast }
    L_A_E_0@{ animation: fast }
    L_E_A_0@{ animation: fast }

Installation

npm install @zeroscaler/zeroscaler-cdk

Usage

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { ZeroScaler } from '@zeroscaler/zeroscaler-cdk';

new Zeroscaler(stack, 'MyZeroscaler', {
    targetGroupArn: 'arn:aws:elasticloadbalancing:...',
    fargateTaskArn: 'arn:aws:ecs:...',
    // Optionally override vpc or cluster
    });

License

MPL-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeroscaler-0.1.4.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeroscaler-0.1.4-py3-none-any.whl (3.8 MB view details)

Uploaded Python 3

File details

Details for the file zeroscaler-0.1.4.tar.gz.

File metadata

  • Download URL: zeroscaler-0.1.4.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for zeroscaler-0.1.4.tar.gz
Algorithm Hash digest
SHA256 411f0aa59b9158aa019374f451f2937f53b872215f36eaa0622b9d51e83d7e1b
MD5 b58f08fb107afbf9fd3c5c397ce1e779
BLAKE2b-256 5eb8f6623acecfd9e404268cbdd3cb5541aa6d513f1a5ecffd36766b22f4ca3b

See more details on using hashes here.

File details

Details for the file zeroscaler-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: zeroscaler-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for zeroscaler-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b870c53440779c448ef0dac60742385b781ac6f3fbaf20883b3bcdeea69cb31a
MD5 9b1a7e667fa5cf6a6f38b5dce69edd76
BLAKE2b-256 f7fddaf3a5840e63879b477a657a04996ddcc6f0ee20b9653cc470837f64986f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page