AWS CDK constructs for ZeroScaler.io
Project description
Zeroscaler CDK TypeScript Construct Library project
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 buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeroscaler-0.1.5.tar.gz.
File metadata
- Download URL: zeroscaler-0.1.5.tar.gz
- Upload date:
- Size: 3.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60317ca294249da6540d0a2fd1fe60962c83b5b15421ca785736a0be7c0741c8
|
|
| MD5 |
b175371d32446b8078add0914010b517
|
|
| BLAKE2b-256 |
5d40c6455c1371954c94e8bd5b42465a1c3fc73739329a274add00b1201ec07f
|
File details
Details for the file zeroscaler-0.1.5-py3-none-any.whl.
File metadata
- Download URL: zeroscaler-0.1.5-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a7b11213cb94c3abc477a63d11f257a82ad1c3cbd133f90bf3ac5f36dcb7a2
|
|
| MD5 |
68dadc2e05a2de8b22ef667027d876d0
|
|
| BLAKE2b-256 |
57d2f26b15b316d934b5d77682aa1cb0ca7d7406e96583fbe5bcc0f9fa33b129
|