Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Attaches an internet gateway, or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC.
To declare this entity in your AWS CloudFormation template, use the following syntax:
{ "Type" : "AWS::EC2::VPCGatewayAttachment", "Properties" : { "InternetGatewayId" :String, "VpcId" :String, "VpnGatewayId" :String} }
Type: AWS::EC2::VPCGatewayAttachment Properties: InternetGatewayId:StringVpcId:StringVpnGatewayId:String
InternetGatewayIdThe ID of the internet gateway.
You must specify either InternetGatewayId or VpnGatewayId, but not both.
Required: No
Type: String
Update requires: No interruption
VpcIdThe ID of the VPC.
Required: Yes
Type: String
Update requires: No interruption
VpnGatewayIdThe ID of the virtual private gateway.
You must specify either InternetGatewayId or VpnGatewayId, but not both.
Required: No
Type: String
Update requires: No interruption
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the VPC gateway attachment.
For more information about using the Ref function, see Ref.
To attach both an Internet gateway and a VPN gateway to a VPC, you must specify two separate AWS::EC2::VPCGatewayAttachment resources:
"AttachGateway" : { "Type" : "AWS::EC2::VPCGatewayAttachment", "Properties" : { "VpcId" : { "Ref" : "VPC" }, "InternetGatewayId" : { "Ref" : "myInternetGateway" } } }, "AttachVpnGateway" : { "Type" : "AWS::EC2::VPCGatewayAttachment", "Properties" : { "VpcId" : { "Ref" : "VPC" }, "VpnGatewayId" : { "Ref" : "myVPNGateway" } } }
AttachGateway: Type: AWS::EC2::VPCGatewayAttachment Properties: VpcId: Ref: VPC InternetGatewayId: Ref: myInternetGateway AttachVpnGateway: Type: AWS::EC2::VPCGatewayAttachment Properties: VpcId: Ref: VPC VpnGatewayId: Ref: myVPNGateway
AttachVpnGateway in the Amazon EC2 API Reference
InternetGateways in the Amazon Virtual Private Cloud User Guide