Skip to main content

AwsEcsAlbServiceModuleSchema

AwsEcsAlbServiceModuleSchema is the input schema for the AwsEcsAlbServiceModule module. This schema defines the comprehensive configuration for Application Load Balancers including listener rules, target groups, routing conditions, and network placement.

@group

Modules/Service/AwsEcsAlbService

@see

AwsEcsAlbServiceModule to learn more about the AwsEcsAlbServiceModule module.

Index

Properties

albName

albName: string = ...

The name of the Application Load Balancer. This name must be unique within the region and will be used to identify the ALB resource.

listeners

listeners: Pick<{ awsAccountId: string; awsRegionId: string; DefaultActions: ({ action: AlbListenerActionFixedResponseActionSchema; actionType: fixed-response } | { action: AlbListenerActionForwardConfigSchema; actionType: forward } | { action: AlbListenerActionRedirectActionSchema; actionType: redirect })[]; Port: number; Protocol: HTTP; rules: { actions: ({ action: AlbListenerActionFixedResponseActionSchema; actionType: fixed-response } | { action: AlbListenerActionForwardConfigSchema; actionType: forward } | { action: AlbListenerActionRedirectActionSchema; actionType: redirect })[]; conditions: ({ condition: AlbListenerRuleHostHeaderConditionSchema; conditionType: host-header } | { condition: AlbListenerRuleHttpHeaderConditionSchema; conditionType: http-header } | { condition: AlbListenerRuleHttpRequestMethodConditionSchema; conditionType: http-request-method } | { condition: AlbListenerRulePathPatternConditionSchema; conditionType: path-pattern } | { condition: AlbListenerRuleQueryStringConditionSchema; conditionType: query-string } | { condition: AlbListenerRuleSourceIpConditionSchema; conditionType: source-ip })[]; Priority: number }[] }, rules | DefaultActions | Port>[] = ...

The listener configuration for the ALB. Listeners check for connection requests on specified ports and protocols, and route traffic based on configured rules and actions. Each listener can have multiple rules for complex routing scenarios.

The configuration includes:

  • Port: The port on which the listener accepts connections
  • DefaultActions: The default action when no rules match (exactly one action required)
  • rules: Array of routing rules with conditions and actions (can be empty)

Supported action types: 'forward', 'redirect', 'fixed-response' Supported condition types: 'host-header', 'http-header', 'http-request-method', 'path-pattern', 'query-string', 'source-ip'

region

region: Region = ...

The AWS region where the ALB will be created. The region must have AWS region anchors configured.

subnets

subnets: Subnet[] = ...

The subnets where the ALB will be deployed. ALBs require at least two subnets in different availability zones for high availability. All specified subnets must be public subnets to allow internet access to the load balancer.

optionaltargets

Optional target groups for the ALB. Target groups define how the ALB routes traffic to registered targets. Each target group specifies an execution, container, and port configuration.