AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

VpnConnection

Define a VPN Connection.

Import

import { VpnConnection } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.VpnConnection

Properties

Configuration passed to the constructor as VpnConnectionProps.

vpcRequired
IVpc

The VPC to connect to.

4 properties inherited from VpnConnectionOptions
ipRequiredinherited from VpnConnectionOptions
string

The ip address of the customer gateway.

asnOptionalinherited from VpnConnectionOptions
number

The ASN of the customer gateway.

Default: 65000

staticRoutesOptionalinherited from VpnConnectionOptions
string[]

The static routes to be routed from the VPN gateway to the customer gateway.

Default: Dynamic routing (BGP)

tunnelOptionsOptionalinherited from VpnConnectionOptions
VpnTunnelOption[]

The tunnel options for the VPN connection. At most two elements (one per tunnel). Duplicates not allowed.

Default: Amazon generated tunnel options

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic