AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::VPNGateway

EC2 VPNGateway

Specifies a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself. For more information, see [](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *User Guide*.

Properties

3 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
Type
string
RequiredCreate-only
AmazonSideAsn
integer
Create-only
Tags
Array<Tag>

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
VPNGatewayIdstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::VPNGateway

Resources:
  MyResource:
    Type: AWS::EC2::VPNGateway
    Properties:
      Type: "value"
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:CreateVpnGatewayec2:DescribeVpnGatewaysec2:CreateTags

read

ec2:DescribeVpnGateways

update

ec2:DescribeVpnGatewaysec2:CreateTagsec2:DeleteTags

delete

ec2:DeleteVpnGatewayec2:DescribeVpnGateways

list

ec2:DescribeVpnGateways

Get the EC2 Cheat Sheet

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

Download Free Infographic

Quick Facts

ServiceEC2
Properties4
Required1
TaggingSupported
Primary IDVPNGatewayId

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

AmazonSideAsnType

External Links