Skip to main content

AWS CDK constructs for ZeroScaler.io

Project description

Zeroscaler CDK TypeScript Construct Library project

npm 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 visibility timeout of the queue.

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.2.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.2-py3-none-any.whl (3.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zeroscaler-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 68d59e752e990ef92d30272cd111251cf08a0d04f0ab1b7ba053727af7ad2253
MD5 e6b90d4e72133f001f2a22d1603f232c
BLAKE2b-256 27fdf779602fc8f453e000666e7e8777648fbec7001dd43a3e24cb39fbb9766a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zeroscaler-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 165f370b9271cec057b32be404a6b3ce8933347bf909e9cae3a6dbb1fc5fde9c
MD5 0e6ed3afa664029ed09322b49a5e31c9
BLAKE2b-256 061fad4ab834d7adedda05d7662bdb6682d1f9493cd4a88bfe3eac724e60e513

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