Skip to content

EndpointGroup

Source: src/AWS/GlobalAccelerator/EndpointGroup.ts

A Global Accelerator endpoint group — the set of regional endpoints (ALBs, NLBs, EC2 instances, or Elastic IPs) that a listener routes traffic to in one AWS Region, with traffic-dial and health-check configuration.

One endpoint group per region per listener. Everything except the listener and region is updatable in place.

Route to an Application Load Balancer

const group = yield* GlobalAccelerator.EndpointGroup("UsWest2", {
listenerArn: listener.listenerArn,
endpointGroupRegion: "us-west-2",
endpoints: [{ endpointId: alb.loadBalancerArn }],
});

Weighted Endpoints with HTTP Health Checks

const group = yield* GlobalAccelerator.EndpointGroup("UsEast1", {
listenerArn: listener.listenerArn,
endpointGroupRegion: "us-east-1",
endpoints: [
{ endpointId: blueAlb.loadBalancerArn, weight: 200 },
{ endpointId: greenAlb.loadBalancerArn, weight: 55 },
],
healthCheckProtocol: "HTTP",
healthCheckPath: "/health",
healthCheckInterval: "10 seconds",
});
const group = yield* GlobalAccelerator.EndpointGroup("Canary", {
listenerArn: listener.listenerArn,
endpointGroupRegion: "eu-west-1",
trafficDialPercentage: 10,
});