aws-ec2-vpn-connection-tunnels
Retrieves Site-to-Site VPN connection tunnels with their status and IKE/IPsec algorithms.
Syntax
Options
- profile=STRING
- Optional option. The identifier of AWS connect profile When omitted, every AWS connect profile the user may use is queried.
- region=STRING
- Optional option. AWS region Accepts a comma separated list. When omitted, every client region of the connect profile is queried.
Output fields
| Field | Type | Name | Description |
|---|---|---|---|
| aws_profile | string | Connect profile | AWS connect profile identifier |
| region | string | Region | e.g. ap-northeast-2 |
| vpn_connection_id | string | VPN connection ID | |
| outside_ip_address | string | Outside IP address | tunnel outside IP |
| tunnel_status | string | Tunnel status | UP or DOWN |
| status_message | string | Status message | |
| last_status_change | date | Last status change | |
| ike_versions | list | IKE versions | e.g. ikev1, ikev2 |
| phase1_encryption_algorithms | list | Phase 1 encryption algorithms | |
| phase2_encryption_algorithms | list | Phase 2 encryption algorithms | |
| phase1_integrity_algorithms | list | Phase 1 integrity algorithms | |
| phase2_integrity_algorithms | list | Phase 2 integrity algorithms | |
| phase1_dh_groups | list | Phase 1 DH groups | Diffie-Hellman group numbers |
| phase2_dh_groups | list | Phase 2 DH groups | Diffie-Hellman group numbers |
Error codes
Parse errors
| Error message | Cause | Resolution |
|---|---|---|
| aws-profile-not-found | No AWS connect profile matches the name given in the profile option. | Check the name on Settings > Connect Profiles and specify it again. |
| no-permission | The account running the query is not granted the connect profile. | Ask an administrator to grant the connect profile. |
| invalid-aws-region | The region option value is not an AWS region name. | Enter an exact AWS region name such as ap-northeast-2. |
| use-one-aws-profile | More than one connect profile was given in the profile option. | Specify a single connect profile. |
Description
Retrieves Site-to-Site VPN connection tunnels with their status and IKE/IPsec algorithms.
The following AWS IAM permissions must be allowed to use this command.
- ec2:DescribeVpnConnections
Without the profile and region options the command queries every client region of every connect profile the user may use, so narrowing the scope with profile and region is recommended in large environments. Each record carries the aws_profile and region fields that tell which profile and region it came from.
Examples
Example: List AWS VPN Connection Tunnels
Situation: A periodic review or an incident investigation needs the result of list aws vpn connection tunnels.
Expected result:
| aws_profile | region | vpn_connection_id | outside_ip_address |
|---|---|---|---|
| aws-prod | ap-northeast-2 | example-id-0123 | example |
Interpretation: One record is one queried item. Use aws_profile and region to tell which account and region it came from, then narrow the columns with fields and either export the result or use it as the lookup stage of a detection rule.
Example: Narrowing to one account and region
Situation: Limit the scope when several connect profiles and regions exist.
Interpretation: Narrowing the scope cuts both the number of AWS API calls and the response time. Scope every scheduled query this way.