JSPM

@zeroscaler/zeroscaler-cdk

0.1.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q38296F
  • License MPL-2.0

AWS CDK constructs for ZeroScaler.io

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zeroscaler/zeroscaler-cdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Zeroscaler CDK TypeScript Construct Library project

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

    The Zeroscaler construct deploys a Lambda function that automatically starts your Fargate application in response to incoming requests. It also handles health monitoring and integrates with an ELB target group.

    You can configure the construct using the (ZeroscalerProps) interface, which requires a target group ARN and Fargate task ARN. Optionally, you can also specify a custom 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