Features
| Pricing | Documentation | Contact | Blog
Defines a WireGuard peer configuration for authentication and network access control. Each peer represents an authorized client that can establish encrypted connections to a WireGuard listener.
To declare this entity in your AWS CloudFormation template, use the following syntax:
{ "PublicKey" : String, "AllowedIPs" : [ String, ... ], "SharedSecret" : String }
PublicKey: String AllowedIPs: [ String, ... ] SharedSecret: String
The base64-encoded WireGuard public key for this peer. This is a 32-byte Curve25519 public key generated by the client using wg genkey | wg pubkey
or equivalent. This key is used to authenticate the peer and establish encrypted communication.
Required: Yes
Type: String
Update requires: No interruption
A list of IP address ranges (in CIDR notation) that this peer is allowed to send traffic from. This provides network-level access control within the WireGuard tunnel. If not specified, the peer can send traffic from any IP address within the tunnel.
Required: No
Type: List of String
Update requires: No interruption
An optional base64-encoded 32-byte pre-shared key (PSK) that provides an additional layer of security through symmetric encryption. The PSK is combined with the key exchange to provide post-quantum security resistance. Both the peer and the listener must be configured with the same SharedSecret value.
Required: No
Type: String
Update requires: No interruption
- PublicKey: "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=" AllowedIPs: - "10.0.0.2/32"
{ "PublicKey": "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=", "AllowedIPs": [ "10.0.0.2/32" ] }
- PublicKey: "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=" AllowedIPs: - "10.0.0.2/32" - "10.0.1.0/24" SharedSecret: "FpCyhws9cxwWoV4xELtfJvjJN+zQVRPISllRWgM="
{ "PublicKey": "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=", "AllowedIPs": [ "10.0.0.2/32", "10.0.1.0/24" ], "SharedSecret": "FpCyhws9cxwWoV4xELtfJvjJN+zQVRPISllRWgM=" }
WireGuard keys can be generated using the wg
command-line tool:
# Generate private key wg genkey > private.key # Generate public key from private key wg pubkey < private.key > public.key # Generate pre-shared key (optional) wg genpsk > preshared.key
The AllowedIPs property serves as an access control mechanism within the WireGuard tunnel:
10.0.0.2/32
) for single-client identification10.0.0.0/24
) for clients that may have multiple addresses