AWS Client VPN - Notification of new client connection to another AWS service (e.g. Lambda)?
0
Hi,
I'd like a Lambda function to be notified when a new client connects to our AWS Client VPN endpoint so that it can take some action to update our private hosted zone in Route53. Is there any way to send a notification from our AWS Client VPN endpoint to Lambda either via SNS or Eventbridge?
Many thanks in advance.
1 Answers
0
Accepted Answer
I've been able to find my own solution that I think will work:
- Setup connection logging from Client VPN endpoint to Cloudwatch Log Group. (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/connection-logging.html)
- Setup Lambda function that gets triggered when a new connection log event comes into the CW log group with the value for the 'connection-attempt-status' key set to 'successful' (https://aws.amazon.com/blogs/mt/get-notified-specific-lambda-function-error-patterns-using-cloudwatch/)
- Have the Lambda function do what it needs to do with the connection info (e.g. take the 'Client IP' key and update Route53).
So essentially, the flow is:
Client VPN Connection Log -> Cloudwatch -> Lambda (via CW log stream subscription) -> Route53.
Any better suggestions welcomed!
answered 7 days ago
Relevant questions
VPN inactivity timeout
asked 2 years agoAWS Client VPN - my systems are in different subnets that are in different VPCs
asked 4 months agoDoes VPC need to be updated if client is changing VPN settings?
asked 21 days agoUsing client vpn with Okta, session re-authenticates multiple times throughout the day
asked 2 months agoAWS client vpn selfservice
asked 2 months agoAWS Client VPN - Notification of new client connection to another AWS service (e.g. Lambda)?
Accepted Answerasked 7 days agoAWS VPN Client - how does it open a browser for SSO ?
asked 3 months agoConflict between AWS site-to-site VPN (to a VPC) and non-AWS client VPN
asked 2 years agoAWS Client VPN via linux command line?
asked 4 months agocan I prevent Client VPN from setting the hostname on the client machine?
Accepted Answerasked a year ago