troubleshooting Question

Disconnecting AWS VPN Client Endpoints after 8 Hours

Avatar of Tessando
TessandoFlag for United States of America asked on
1 Comment1 Solution16 ViewsLast Modified:
I need some assistance architecting a solution that is an automated way to remove Users from an AWS Client VPN Endpoint.

Because AWS charges for connections, I would like to create something that would automatically kick off a User and require them to log back in after 8 hours.

I've been told by AWS Support that this is attainable by using Lambda to check the state of the VPN connection and CloudWatch to execute a check during a given amount of time (say, every 5 minutes).

I am fairly competent with CloudWatch, so really I'm seeking some cose assistance.

The Lambda function would work something like this:

DescribeClientVpnConnections [1] could be used
 IF condition to verify that if the parameter "connectionEstablishedTime" has exceeded 8 hours duration.
 If it has exceeded 8 hours duration then to make another API call "TerminateClientVpnConnections " for that connection.

Does anyone have a good recipe for something like this? It doesn't have to be Lambda, that was just suggested by AWS Support.

Thanks for your help.

IT Administrator

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros