Interface CpServiceProps

Properties that are used to customize the service. You can add multiple services behind the load balancer using addService() method and passing these properties for customization.

interface CpServiceProps {
    cpContainerPort?: number;
    cpEcrRepositoryAccount?: string;
    cpEcrRepositoryAccountRole?: string;
    cpEfs?: FileSystem;
    cpFargateServiceProps?: CcFargateServiceProps;
    cpFargateTaskDefinitionProps?: CcFargateTaskDefinitionProps;
    cpHealthCheckPath?: string;
    cpImage: ContainerImage;
    cpLogDriver?: LogDriver;
    cpLogStreamPrefix?: string;
    cpMaxAutoscalingCapacity?: number;
    cpMinAutoscalingCapacity?: number;
    cpPathPattern?: string;
    cpServiceName: string;
    cpServicePriority?: number;
    cpTargetCPUUtilizationPercent?: number;
    cpTargetMemoryUtilizationPercent?: number;
}

Properties

cpContainerPort?: number

Port at which container listens for requests

Default

80
cpEcrRepositoryAccount?: string

Target Account where ecr repository is located

Default

Account where stack is executed
cpEcrRepositoryAccountRole?: string

Role in target account to be assumed by task definition

cpEfs?: FileSystem

EFS file system to mount for the container at path /app

Default Value

Mounts an EFS filesystem at /app directory
cpFargateServiceProps?: CcFargateServiceProps

Additional Fargate Service Props

cpFargateTaskDefinitionProps?: CcFargateTaskDefinitionProps

Additional fargate task definition properties

cpHealthCheckPath?: string

Health check path e.g. /health

Default

Root path pattern of the service e.g. /user or /account
cpImage: ContainerImage

Container image used for the task definition

cpLogDriver?: LogDriver

Container log driver

Default

AWSLogDriver
cpLogStreamPrefix?: string

Log stream prefix

Default

name of the service Logs
cpMaxAutoscalingCapacity?: number

Maximum capacity allocation for autoscaling

Default

10 tasks for production 2 tasks for non production environments
cpMinAutoscalingCapacity?: number

Minimum capacity allocation for autoscaling

Default

2 tasks for production 1 tasks for non production environments
cpPathPattern?: string

Service Path e.g /user or /account

Default

/
cpServiceName: string

Service name e.g. UserService, FileService etc.

cpServicePriority?: number

Priority of the service within the load balancer routing

Default

1
cpTargetCPUUtilizationPercent?: number

CPU utilization percentage when autoscaling should trigger

Default Value

60 percent for production 80 for non production environments
cpTargetMemoryUtilizationPercent?: number

Memory utilization percentage when autoscaling should trigger

Default Value

70 percent for production 90 for non production environments

Generated using TypeDoc