Skip to main content

AwsEcsExecutionModuleSchema

AwsEcsExecutionModuleSchema is the input schema for the AwsEcsExecutionModule module: which deployments run as one ECS service, in which environment and subnet, how many tasks, and what they may reach.

@group

Modules/Execution/AwsEcsExecution

@see

AwsEcsExecutionModule to learn more about the AwsEcsExecutionModule module.

Index

Properties

deployments

deployments: { main: { containerProperties: AwsEcsExecutionModuleDeploymentContainerPropertiesSchema; deployment: Deployment }; sidecars: { containerProperties: Pick<AwsEcsExecutionModuleDeploymentContainerPropertiesSchema, image>; deployment: Deployment }[] }

The deployments the task runs, each with its containerProperties. main is the server the execution is for; each of sidecars runs beside it in the same task, such as a log shipper or a proxy, and sets only its image.


Type declaration

desiredCount

desiredCount: number

How many tasks the service keeps running at once. ECS replaces a task that stops.

environment

environment: Environment

The environment to run in, from AwsEcsEnvironmentModule; its ECS cluster runs the tasks.

optionalenvironmentVariables

environmentVariables?: Record<string, string> = {}

Environment variables for every container of the task, on top of the environment's own. A key is two or more letters, digits or underscores; a value is not empty.

executionId

executionId: string

A unique identifier for this execution. It names the IAM role the task runs as, and IAM role names are shared by every region of an account, so it must be unique within the account.

optionalfilesystems

filesystems?: Filesystem[] = []

The EFS filesystems every container mounts at /mnt/<filesystemName>, from AwsEfsFilesystemModule. The subnet must mount each one first, through its localFilesystems.

optionallogRetentionInDays

logRetentionInDays?: 1 | 3 | 5 | 7 | 14 | 30 | 60 | 90 | 120 | 150 | 180 | 365 | 400 | 545 | 731 | 1096 | 1827 | 2192 | 2557 | 2922 | 3288 | 3653 = 30

How many days the containers' logs are kept before CloudWatch deletes them: one of 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288 or 3653.

optionalsecurityGroupRules

securityGroupRules?: AwsSecurityGroupAnchorRuleSchema[] = []

Security group rules to apply to the execution. The execution's one security group holds these together with the rules of each deployment's server.

subnet

subnet: Subnet

The subnet the tasks run in, from AwsSimpleSubnetModule. Its type decides whether they reach the internet, and through what.