---
type: resource-type
title: VPCGatewayAttachment
description: aws resource type AWS::EC2::VPCGatewayAttachment
name: VPCGatewayAttachment
lexicon: aws
resource_type: AWS::EC2::VPCGatewayAttachment
---
`AWS::EC2::VPCGatewayAttachment`, a resource type of the aws lexicon.

## Properties

- `VpcId` (`string`, required): The ID of the VPC.
- `AttachmentType` (`string`, optional): Used to identify if this resource is an Internet Gateway or Vpn Gateway Attachment
- `InternetGatewayId` (`string`, optional): The ID of the internet gateway. You must specify either InternetGatewayId or VpnGatewayId, but not both.
- `VpnGatewayId` (`string`, optional): The ID of the virtual private gateway. You must specify either InternetGatewayId or VpnGatewayId, but not both.

## Attributes

- `AttachmentType`

## Governed by

- [WAW030](/rules/WAW030.md): Missing DependsOn for known CloudFormation ordering patterns
