AwsEcsAlbServiceModule
Hierarchy
- AModule<AwsEcsAlbServiceModuleSchema, AwsEcsAlbService>
- AwsEcsAlbServiceModule
Index
Constructors
constructor
Parameters
moduleId: string
The ID this module is loaded under.
Returns AwsEcsAlbServiceModule
Properties
readonlyinheritedmoduleId
The ID this module was loaded under. It scopes everything the module produces, so the same module class can be loaded more than once.
staticreadonlyinheritedMODULE_PACKAGE
The package the module is registered under, set by Module.
staticreadonlyinheritedMODULE_SCHEMA
The schema of the module's inputs, set by Module.
Methods
onInit
Validates the subnets are public, creates the load balancer, and overlays it onto the executions it routes to.
Parameters
inputs: AwsEcsAlbServiceModuleSchema
Returns Promise<[AwsEcsAlbService, AwsEcsAlbServiceOverlay]>
inheritedregisterHooks
To hook custom behavior into Octo's lifecycle for the duration of this module. Override it to return the callbacks you want run.
Returns { postCommitHooks?: PostHookSignature[]; postModelActionHooks?: PostHookSignature[]; postResourceActionHooks?: PostHookSignature[]; preCommitHooks?: PreHookSignature[]; preModelActionHooks?: PreHookSignature[]; preResourceActionHooks?: PreHookSignature[] }
optionalpostCommitHooks?: PostHookSignature[]
optionalpostModelActionHooks?: PostHookSignature[]
optionalpostResourceActionHooks?: PostHookSignature[]
optionalpreCommitHooks?: PreHookSignature[]
optionalpreModelActionHooks?: PreHookSignature[]
optionalpreResourceActionHooks?: PreHookSignature[]
registerMetadata
Resolves the account, region, availability zones, and the subnet models this load balancer sits in.
Parameters
inputs: AwsEcsAlbServiceModuleSchema
Returns Promise<{ awsAccountId: string; awsAvailabilityZones: string[]; awsRegionId: string; subnets: Subnet[] }>
AwsEcsAlbServiceModulecreates an Application Load Balancer in front of ECS executions, with itslisteners, routing rules andtargets.An ALB bills every hour it exists, about $0.0225 an hour in us-east-1 (about $16 a month) whether it serves or not, plus about $0.008 per load balancer capacity unit-hour of traffic. Data sent to the internet is billed on top.
Changing a target group's health check updates it in place. A replaced load balancer gets a new DNS name, so whatever calls it by the old one fails until it moves. A replaced target group drains its targets for up to 300 seconds, AWS's default deregistration delay.
TypeScript
Modules/Service/AwsEcsAlbService
AWS needs an ALB's subnets in at least two availability zones, so its region comes from
AwsMultiAzRegionModule.albNameis at most 32 characters, unique in its region. The load balancer is internet-facing and answers anyone who reaches it, even behindAwsCloudFrontServiceModule.Every listener speaks plain HTTP: the load balancer holds no certificate and serves no HTTPS. Users reach it over HTTPS only through
AwsCloudFrontServiceModulein front of it.Every target group registers tasks by IP and speaks HTTP/1 to them over IPv4; HTTP/2 and gRPC to a task are not available.
Nothing: a load balancer holds no data.
Changing
albNameorregionreplaces the load balancer; itssubnetschange in place. Changing a target's name, port or protocol replaces its target group.Servicemodel.