TargetGroup
Source:
src/AWS/VpcLattice/TargetGroup.ts
An Amazon VPC Lattice target group — the collection of compute targets (IPs, EC2 instances, ALBs, or Lambda functions) that a lattice service’s listeners and rules forward traffic to.
Creating Target Groups
Section titled “Creating Target Groups”Lambda Target Group
const targets = yield* TargetGroup("ApiTargets", { type: "LAMBDA", targets: [{ id: fn.functionArn }],});IP Target Group with Health Check
const targets = yield* TargetGroup("BackendTargets", { type: "IP", port: 80, protocol: "HTTP", vpcIdentifier: vpc.vpcId, healthCheck: { enabled: true, path: "/health", healthCheckInterval: "30 seconds", healthCheckTimeout: "5 seconds", }, targets: [{ id: "10.0.1.10", port: 80 }],});