Enable Site-to-Site VPN logs to log VPN activity, such as tunnel state and other details. You can enable logging on a new connection or modify an existing connection to start logging activity. If you want to disable logging for a connection, see Disable Site-to-Site VPN logs.
Note
When you enable Site-to-Site VPN logs for an existing VPN connection tunnel, your connectivity over that tunnel can be interrupted for several minutes. However, each VPN connection offers two tunnels for high availability, so you can enable logging on one tunnel at a time while maintaining connectivity over the tunnel not being modified. For more information, see AWS Site-to-Site VPN tunnel endpoint replacements.
To enable VPN logging during creation of a new Site-to-Site VPN connection
Follow the procedure Step 5: Create a VPN connection. During Step 9 Tunnel Options, you can specify all the options you want to use for both tunnels, including VPN logging options. For more information about these options, see Tunnel options for your AWS Site-to-Site VPN connection.
To enable tunnel logging on a new Site-to-Site VPN connection using the AWS command line or API
-
CreateVpnConnection (Amazon EC2 Query API)
-
create-vpn-connection
(AWS CLI)
To enable tunnel logging on an existing Site-to-Site VPN connection
Open the Amazon VPC console at https://console.aws.amazon.com/vpc/
. -
In the navigation pane, choose Site-to-Site VPN connections.
-
Select the VPN connection that you want to modify from the VPN connections list.
-
Select Actions, Modify VPN tunnel options.
-
Select the tunnel that you want to modify by choosing the appropriate IP address from the VPN tunnel outside IP address list.
-
Under Tunnel activity log, select Enable.
-
Under Amazon CloudWatch log group, select the Amazon CloudWatch log group where you want the logs to be sent.
-
(Optional) Under Output format, choose the desired format for the log output, either json or text.
-
Select Save changes.
-
(Optional) Repeat steps 4 through 9 for the other tunnel if desired.
To enable tunnel logging on an existing Site-to-Site VPN connection using the AWS command line or API
-
ModifyVpnTunnelOptions (Amazon EC2 Query API)
-
modify-vpn-tunnel-options
(AWS CLI)