VpcConnector
Source:
src/AWS/AppRunner/VpcConnector.ts
An AWS App Runner VPC connector. Associating a connector with an App Runner service routes the service’s outbound traffic through your VPC (e.g. to reach an RDS database in private subnets).
VPC connectors are immutable: any change to subnets or security groups replaces the connector.
Creating a VPC Connector
Section titled “Creating a VPC Connector”const connector = yield* AppRunner.VpcConnector("Egress", { subnets: [subnetA.subnetId, subnetB.subnetId], securityGroups: [egressSecurityGroup.securityGroupId],});Routing a Service through the VPC
Section titled “Routing a Service through the VPC”const service = yield* AppRunner.Service("Api", { imageRepository: { imageIdentifier: image.imageUri, imageRepositoryType: "ECR", port: "8080", }, accessRoleArn: accessRole.roleArn, networkConfiguration: { egressType: "VPC", vpcConnectorArn: connector.vpcConnectorArn, },});