Provides information to Amazon Web Services about your VPN customer gateway device. The customer gateway is the appliance at your end of the VPN connection. (The device on the Amazon Web Services side of the VPN connection is the virtual private gateway.) You must provide the internet-routable IP address of the customer gateway’s external interface. The IP address must be static and can be behind a device performing network address translation (NAT).
For devices that use Border Gateway Protocol (BGP), you can also provide the device’s BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don’t have an ASN already, you can use a private ASN (in the 64512 - 65534 range).
Note
Amazon EC2 supports all 4-byte ASN numbers in the range of 1 - 2147483647, with the exception of the following:
7224 - reserved in the us-east-1
Region
9059 - reserved in the eu-west-1
Region
17943 - reserved in the ap-southeast-1
Region
10124 - reserved in the ap-northeast-1
Region
For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .
Warning
To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. Identical requests return information about the existing customer gateway and do not create new customer gateways.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
create-customer-gateway
--bgp-asn <value>
[--public-ip <value>]
[--certificate-arn <value>]
--type <value>
[--tag-specifications <value>]
[--device-name <value>]
[--dry-run | --no-dry-run]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--bgp-asn
(integer)
For devices that support BGP, the customer gateway’s BGP ASN.
Default: 65000
--public-ip
(string)
The Internet-routable IP address for the customer gateway’s outside interface. The address must be static.
--certificate-arn
(string)
The Amazon Resource Name (ARN) for the customer gateway certificate.
--type
(string)
The type of VPN connection that this customer gateway supports (
ipsec.1
).Possible values:
ipsec.1
--tag-specifications
(list)
The tags to apply to the customer gateway.
(structure)
The tags to apply to a resource when the resource is being created.
ResourceType -> (string)
The type of resource to tag on creation.
Tags -> (list)
The tags to apply to the resource.
(structure)
Describes a tag.
Key -> (string)
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with
aws:
.Value -> (string)
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.
Shorthand Syntax:
ResourceType=string,Tags=[{Key=string,Value=string},{Key=string,Value=string}] ...
JSON Syntax:
[
{
"ResourceType": "capacity-reservation"|"client-vpn-endpoint"|"customer-gateway"|"carrier-gateway"|"dedicated-host"|"dhcp-options"|"egress-only-internet-gateway"|"elastic-ip"|"elastic-gpu"|"export-image-task"|"export-instance-task"|"fleet"|"fpga-image"|"host-reservation"|"image"|"import-image-task"|"import-snapshot-task"|"instance"|"instance-event-window"|"internet-gateway"|"ipam"|"ipam-pool"|"ipam-scope"|"ipv4pool-ec2"|"ipv6pool-ec2"|"key-pair"|"launch-template"|"local-gateway"|"local-gateway-route-table"|"local-gateway-virtual-interface"|"local-gateway-virtual-interface-group"|"local-gateway-route-table-vpc-association"|"local-gateway-route-table-virtual-interface-group-association"|"natgateway"|"network-acl"|"network-interface"|"network-insights-analysis"|"network-insights-path"|"network-insights-access-scope"|"network-insights-access-scope-analysis"|"placement-group"|"prefix-list"|"replace-root-volume-task"|"reserved-instances"|"route-table"|"security-group"|"security-group-rule"|"snapshot"|"spot-fleet-request"|"spot-instances-request"|"subnet"|"traffic-mirror-filter"|"traffic-mirror-session"|"traffic-mirror-target"|"transit-gateway"|"transit-gateway-attachment"|"transit-gateway-connect-peer"|"transit-gateway-multicast-domain"|"transit-gateway-route-table"|"volume"|"vpc"|"vpc-endpoint"|"vpc-endpoint-service"|"vpc-peering-connection"|"vpn-connection"|"vpn-gateway"|"vpc-flow-log",
"Tags": [
{
"Key": "string",
"Value": "string"
}
...
]
}
...
]
--device-name
(string)
A name for the customer gateway device.
Length Constraints: Up to 255 characters.
--dry-run
| --no-dry-run
(boolean)
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
To create a customer gateway
This example creates a customer gateway with the specified IP address for its outside interface.
Command:
aws ec2 create-customer-gateway --type ipsec.1 --public-ip 12.1.2.3 --bgp-asn 65534
Output:
{
"CustomerGateway": {
"CustomerGatewayId": "cgw-0e11f167",
"IpAddress": "12.1.2.3",
"State": "available",
"Type": "ipsec.1",
"BgpAsn": "65534"
}
}
CustomerGateway -> (structure)
Information about the customer gateway.
BgpAsn -> (string)
The customer gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).
CustomerGatewayId -> (string)
The ID of the customer gateway.
IpAddress -> (string)
The Internet-routable IP address of the customer gateway’s outside interface.
CertificateArn -> (string)
The Amazon Resource Name (ARN) for the customer gateway certificate.
State -> (string)
The current state of the customer gateway (
pending | available | deleting | deleted
).Type -> (string)
The type of VPN connection the customer gateway supports (
ipsec.1
).DeviceName -> (string)
The name of customer gateway device.
Tags -> (list)
Any tags assigned to the customer gateway.
(structure)
Describes a tag.
Key -> (string)
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with
aws:
.Value -> (string)
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.