import { LowCostECS } from 'low-cost-ecs'
new LowCostECS(scope: Construct, id: string, props: LowCostECSProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
LowCostECSProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: LowCostECSProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { LowCostECS } from 'low-cost-ecs'
LowCostECS.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
certFileSystem |
aws-cdk-lib.aws_efs.FileSystem |
EFS file system that the SSL/TLS certificates are installed. |
cluster |
aws-cdk-lib.aws_ecs.Cluster |
ECS cluster created in configured VPC. |
hostAutoScalingGroup |
aws-cdk-lib.aws_autoscaling.AutoScalingGroup |
ECS on EC2 service host instance autoscaling group. |
serverTaskDefinition |
aws-cdk-lib.aws_ecs.Ec2TaskDefinition |
Server task definition generated from LowCostECSTaskDefinitionOptions. |
service |
aws-cdk-lib.aws_ecs.Ec2Service |
ECS service of the server with desiredCount: 1, minHealthyPercent: 0, maxHealthyPercent: 100. |
topic |
aws-cdk-lib.aws_sns.Topic |
SNS topic used to notify certbot renewal failure. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly certFileSystem: FileSystem;
- Type: aws-cdk-lib.aws_efs.FileSystem
EFS file system that the SSL/TLS certificates are installed.
public readonly cluster: Cluster;
- Type: aws-cdk-lib.aws_ecs.Cluster
ECS cluster created in configured VPC.
public readonly hostAutoScalingGroup: AutoScalingGroup;
- Type: aws-cdk-lib.aws_autoscaling.AutoScalingGroup
ECS on EC2 service host instance autoscaling group.
public readonly serverTaskDefinition: Ec2TaskDefinition;
- Type: aws-cdk-lib.aws_ecs.Ec2TaskDefinition
Server task definition generated from LowCostECSTaskDefinitionOptions.
public readonly service: Ec2Service;
- Type: aws-cdk-lib.aws_ecs.Ec2Service
ECS service of the server with desiredCount: 1, minHealthyPercent: 0, maxHealthyPercent: 100.
https://github.com/rajyan/low-cost-ecs#limitations
public readonly topic: Topic;
- Type: aws-cdk-lib.aws_sns.Topic
SNS topic used to notify certbot renewal failure.
import { LowCostECSProps } from 'low-cost-ecs'
const lowCostECSProps: LowCostECSProps = { ... }
Name | Type | Description |
---|---|---|
email |
string |
Email for expiration emails to register to your let's encrypt account. |
hostedZoneDomain |
string |
Domain name of the hosted zone. |
awsCliDockerTag |
string |
Docker image tag of amazon/aws-cli. |
certbotDockerTag |
string |
Docker image tag of certbot/dns-route53 to create certificates. |
certbotScheduleInterval |
number |
Certbot task schedule interval in days to renew the certificate. |
containerInsights |
boolean |
Enable container insights or not. |
hostInstanceSpotPrice |
string |
The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request. |
hostInstanceType |
string |
Instance type of the ECS host instance. |
logGroup |
aws-cdk-lib.aws_logs.ILogGroup |
Log group of the certbot task and the aws-cli task. |
recordDomainNames |
string[] |
Domain names for A records to elastic ip of ECS host instance. |
removalPolicy |
aws-cdk-lib.RemovalPolicy |
Removal policy for the file system and log group (if using default). |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
Security group of the ECS host instance. |
serverTaskDefinition |
LowCostECSTaskDefinitionOptions |
Task definition for the server ecs task. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
VPC of the ECS cluster and EFS file system. |
public readonly email: string;
- Type: string
Email for expiration emails to register to your let's encrypt account.
https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html
public readonly hostedZoneDomain: string;
- Type: string
Domain name of the hosted zone.
public readonly awsCliDockerTag: string;
- Type: string
- Default: latest
Docker image tag of amazon/aws-cli.
This image is used to associate elastic ip on host instance startup, and run certbot cfn on ecs container startup.
public readonly certbotDockerTag: string;
- Type: string
- Default: v1.29.0
Docker image tag of certbot/dns-route53 to create certificates.
public readonly certbotScheduleInterval: number;
- Type: number
- Default: 60
Certbot task schedule interval in days to renew the certificate.
public readonly containerInsights: boolean;
- Type: boolean
- Default: undefined (container insights disabled)
Enable container insights or not.
public readonly hostInstanceSpotPrice: string;
- Type: string
- Default: undefined
The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request.
Host instance asg would use spot instances if hostInstanceSpotPrice is set.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.AddCapacityOptions.html#spotprice
public readonly hostInstanceType: string;
- Type: string
- Default: t2.micro
Instance type of the ECS host instance.
public readonly logGroup: ILogGroup;
- Type: aws-cdk-lib.aws_logs.ILogGroup
- Default: Creates default cdk log group
Log group of the certbot task and the aws-cli task.
public readonly recordDomainNames: string[];
- Type: string[]
- Default: [ props.hostedZone.zoneName ]
Domain names for A records to elastic ip of ECS host instance.
public readonly removalPolicy: RemovalPolicy;
- Type: aws-cdk-lib.RemovalPolicy
- Default: RemovalPolicy.DESTROY
Removal policy for the file system and log group (if using default).
public readonly securityGroups: ISecurityGroup[];
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
- Default: Creates security group with allowAllOutbound and ingress rule (ipv4, ipv6) => (tcp 80, 443).
Security group of the ECS host instance.
public readonly serverTaskDefinition: LowCostECSTaskDefinitionOptions;
- Type: LowCostECSTaskDefinitionOptions
- Default: Nginx server task definition defined in sampleTaskDefinition()
Task definition for the server ecs task.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: Creates vpc with only public subnets and no NAT gateways.
VPC of the ECS cluster and EFS file system.
import { LowCostECSTaskDefinitionOptions } from 'low-cost-ecs'
const lowCostECSTaskDefinitionOptions: LowCostECSTaskDefinitionOptions = { ... }
Name | Type | Description |
---|---|---|
containers |
aws-cdk-lib.aws_ecs.ContainerDefinitionOptions[] |
No description. |
taskDefinition |
aws-cdk-lib.aws_ecs.Ec2TaskDefinitionProps |
No description. |
volumes |
aws-cdk-lib.aws_ecs.Volume[] |
No description. |
public readonly containers: ContainerDefinitionOptions[];
- Type: aws-cdk-lib.aws_ecs.ContainerDefinitionOptions[]
public readonly taskDefinition: Ec2TaskDefinitionProps;
- Type: aws-cdk-lib.aws_ecs.Ec2TaskDefinitionProps
public readonly volumes: Volume[];
- Type: aws-cdk-lib.aws_ecs.Volume[]