import { AlbFargateServices } from 'serverless-container-constructs'
new AlbFargateServices(scope: Construct, id: string, props: AlbFargateServicesProps)- Type:
constructs.Construct
- Type:
string
public readonly externalAlb: ApplicationLoadBalancer;public readonly internalAlb: ApplicationLoadBalancer;import { BaseFargateServices } from 'serverless-container-constructs'
new BaseFargateServices(scope: Construct, id: string, props: BaseFargateServicesProps)- Type:
constructs.Construct
- Type:
string
public readonly service: FargateService[];The service(s) created from the task(s).
public readonly vpc: IVpc;- Type:
aws-cdk-lib.aws_ec2.IVpc
import { AlbFargateServicesProps } from 'serverless-container-constructs'
const albFargateServicesProps: AlbFargateServicesProps = { ... }public readonly tasks: FargateTaskProps[];public readonly enableExecuteCommand: boolean;- Type:
boolean - Default: false
Whether to enable ECS Exec support.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html
public readonly route53Ops: Route53Options;public readonly spot: boolean;- Type:
boolean - Default: false
create a FARGATE_SPOT only cluster.
public readonly vpc: IVpc;- Type:
aws-cdk-lib.aws_ec2.IVpc
public readonly vpcSubnets: SubnetSelection;- Type:
aws-cdk-lib.aws_ec2.SubnetSelection - Default: { subnetType: ec2.SubnetType.PRIVATE, }
The subnets to associate with the service.
import { BaseFargateServicesProps } from 'serverless-container-constructs'
const baseFargateServicesProps: BaseFargateServicesProps = { ... }public readonly tasks: FargateTaskProps[];public readonly enableExecuteCommand: boolean;- Type:
boolean - Default: false
Whether to enable ECS Exec support.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html
public readonly route53Ops: Route53Options;public readonly spot: boolean;- Type:
boolean - Default: false
create a FARGATE_SPOT only cluster.
public readonly vpc: IVpc;- Type:
aws-cdk-lib.aws_ec2.IVpc
public readonly vpcSubnets: SubnetSelection;- Type:
aws-cdk-lib.aws_ec2.SubnetSelection - Default: { subnetType: ec2.SubnetType.PRIVATE, }
The subnets to associate with the service.
import { FargateTaskProps } from 'serverless-container-constructs'
const fargateTaskProps: FargateTaskProps = { ... }public readonly listenerPort: number;- Type:
number
public readonly task: FargateTaskDefinition;public readonly accessibility: LoadBalancerAccessibility;- Type:
serverless-container-constructs.LoadBalancerAccessibility - Default: both
Register the service to internal ELB, external ELB or both.
public readonly capacityProviderStrategy: CapacityProviderStrategy[];public readonly desiredCount: number;- Type:
number - Default: 1
desired number of tasks for the service.
public readonly scalingPolicy: ServiceScalingPolicy;- Type:
serverless-container-constructs.ServiceScalingPolicy - Default: { maxCapacity: 10, targetCpuUtilization: 50, requestsPerTarget: 1000 }
service autoscaling policy.
import { Route53Options } from 'serverless-container-constructs'
const route53Options: Route53Options = { ... }public readonly externalElbRecordName: string;- Type:
string - Default: external
the external ELB record name.
public readonly internalElbRecordName: string;- Type:
string - Default: internal
the internal ELB record name.
public readonly zoneName: string;- Type:
string - Default: svc.local
private zone name.
import { ServiceScalingPolicy } from 'serverless-container-constructs'
const serviceScalingPolicy: ServiceScalingPolicy = { ... }public readonly maxCapacity: number;- Type:
number - Default: 10
max capacity for the service autoscaling.
public readonly requestPerTarget: number;- Type:
number - Default: 1000
request per target.
public readonly targetCpuUtilization: number;- Type:
number - Default: 50
target cpu utilization.
The load balancer accessibility.
register to external load balancer only.
register to internal load balancer only.