TargetGroup
Source:
src/AWS/ELBv2/TargetGroup.ts
An ELBv2 target group. A target group routes requests to one or more registered targets (instances, IPs, Lambda functions, or another ALB) using the configured protocol and port, and runs health checks against them.
Creating a Target Group
Section titled “Creating a Target Group”HTTP target group
const tg = yield* TargetGroup("web", { vpcId: vpc.vpcId, port: 80, protocol: "HTTP", targetType: "ip",});gRPC target group
const tg = yield* TargetGroup("grpc", { vpcId: vpc.vpcId, port: 50051, protocol: "HTTP", protocolVersion: "GRPC", matcher: { GrpcCode: "0" },});Health Checks
Section titled “Health Checks”const tg = yield* TargetGroup("api", { vpcId: vpc.vpcId, port: 8080, protocol: "HTTP", healthCheckPath: "/healthz", healthCheckIntervalSeconds: 15, healthyThresholdCount: 3, unhealthyThresholdCount: 3,});