Skip to content
GitHubXDiscord

VpcIngressConnection

The VpcIngressConnection resource allows you to create and manage AWS AppRunner VpcIngressConnections that enable secure connections between your AppRunner services and your Amazon VPC.

Create a basic VpcIngressConnection with required properties and one optional tag.

import AWS from "alchemy/aws/control";
const vpcIngressConnection = await AWS.AppRunner.VpcIngressConnection("myVpcIngressConnection", {
ServiceArn: "arn:aws:apprunner:us-east-1:123456789012:service/myService",
IngressVpcConfiguration: {
VpcId: "vpc-0abcd1234efgh5678",
SecurityGroupIds: [
"sg-0abcd1234efgh5678"
],
Subnets: [
"subnet-0abcd1234efgh5678"
]
},
VpcIngressConnectionName: "MyVpcConnection",
Tags: [
{
Key: "Environment",
Value: "Production"
}
]
});

Configure a VpcIngressConnection with detailed ingress VPC settings and multiple tags for better resource management.

const advancedVpcIngressConnection = await AWS.AppRunner.VpcIngressConnection("advancedVpcIngressConnection", {
ServiceArn: "arn:aws:apprunner:us-east-1:123456789012:service/myAdvancedService",
IngressVpcConfiguration: {
VpcId: "vpc-0abcd1234efgh5678",
SecurityGroupIds: [
"sg-0abcd1234efgh5678"
],
Subnets: [
"subnet-0abcd1234efgh5678",
"subnet-1abcd1234efgh5678"
]
},
VpcIngressConnectionName: "AdvancedVpcConnection",
Tags: [
{
Key: "Project",
Value: "MyApp"
},
{
Key: "Team",
Value: "DevOps"
}
]
});

Create a VpcIngressConnection that adopts an existing resource instead of failing.

const adoptVpcIngressConnection = await AWS.AppRunner.VpcIngressConnection("adoptVpcIngressConnection", {
ServiceArn: "arn:aws:apprunner:us-east-1:123456789012:service/myAdoptedService",
IngressVpcConfiguration: {
VpcId: "vpc-0abcd1234efgh5678",
SecurityGroupIds: [
"sg-0abcd1234efgh5678"
],
Subnets: [
"subnet-0abcd1234efgh5678"
]
},
VpcIngressConnectionName: "AdoptedVpcConnection",
adopt: true
});