Client VPN
Manual Steps for Setting Up AWS Client VPN with IAM Identity Center (SSO)
This guide outlines the manual steps needed to configure AWS Client VPN using IAM Identity Center (formerly AWS SSO).
Refer to this AWS blog post for additional context.
Step 1: Configure IAM Identity Center (on the AWS Root Account)
Create an Application for the VPN Client
- In IAM Identity Center, create a new application with the display name:
VPN Client. - Create a group named
allow_vpnand add users who should have VPN access and self-service access. - Set the following properties for the application:
- Application ACS URL:
http://127.0.0.1:35001 - SAML Audience:
urn:amazon:webservices:clientvpn - Download the SAML metadata file for this application.
- Save the application.
- Assign the
allow_vpngroup to the application. - Edit the application's attribute mappings using the table below:
Attribute Mappings
| User Attribute in Application | Maps to This Value or IAM Identity Center Attribute | Format |
|---|---|---|
| Subject | ${user:email} |
emailAddress |
| FirstName | ${user:givenName} |
unspecified |
| LastName | ${user:groups} |
unspecified |
| memberOf | ${user:familyName} |
unspecified |
Create an Application for VPN Self-Service
- Create a second application with the display name:
VPN Client Self Service. - Set the following properties:
- Application ACS URL:
https://self-service.clientvpn.amazonaws.com/api/auth/sso/saml - SAML Audience:
urn:amazon:webservices:clientvpn - Download the SAML metadata file for this application.
- Save the application.
- Assign the
allow_vpngroup to the application. - Use the same attribute mappings as defined above.
Step 2: Deploy the Client VPN (in a Non-Root AWS Account)
You should deploy the client VPN in a target AWS account (e.g., dev, transit), not the root account.
- Move both downloaded metadata XML files to your Infrastructure as Code (IaC) repository.
- Use the appropriate module to deploy the client VPN in the target AWS account.
- Once deployed, navigate to the Client VPN service in the AWS Console and copy the Self-Service Portal URL.
Step 3: Final Configuration in IAM Identity Center
- Return to the root AWS account.
- Edit the VPN Client Self Service application you created earlier.
- Set the Application Start URL to the Self-Service Portal URL you copied from the Client VPN.
Final Result
Users in the allow_vpn group can now:
- Open the AWS Access Portal.
- Go to the Applications tab.
- Launch the VPN Client Self Service app.
- Download the VPN client configuration via the self-service portal.
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| domain_name | The domain name for the VPN | string |
n/a | yes |
| grant_cidr_blocks | The CIDR block to grant access to from the VPN | list(string) |
n/a | yes |
| grant_sgs | The security groups to grant access to from the VPN | map(object({ |
n/a | yes |
| name | The name of the VPN | string |
n/a | yes |
| subnets | The subnets where the VPN will be deployed | list(string) |
n/a | yes |
| vpc_cidr_block | The CIDR block of the VPC | string |
n/a | yes |
| vpc_id | The VPC ID where the VPN will be deployed | string |
n/a | yes |
| vpn_client_metadata | The xml metadata file path for the VPN client | string |
n/a | yes |
| vpn_client_self_service_metadata | The xml metadata file path for the VPN client self service | string |
n/a | yes |
Outputs
| Name | Description |
|---|---|
| client_vpn_endpoint_id | The ID of the Client VPN endpoint |
| client_vpn_security_group_id | The ID of the security group associated with the Client VPN endpoint |
| self_service_portal_url | The URL for the self-service portal of the Client VPN endpoint |