This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Base class for implementing Lambda handlers as classes. | |
Used across multiple Lambda functions (included in each zip file). | |
Add additional features here common to all your Lambdas, like logging.""" | |
class LambdaBase(object): | |
@classmethod | |
def get_handler(cls, *args, **kwargs): | |
def handler(event, context): | |
return cls(*args, **kwargs).handle(event, context) | |
return handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
########################################################################## | |
# Uses openconnect to connect to a VPN gateway and ssh into the specified | |
# remote host as per the arguments passed to the script, and route internet | |
# traffic through a default gateway. | |
# Note: The script assumes internet connectivity on the wireless interface | |
# "usage: ./vpn <remote_user> <remote_host>" | |
########################################################################### |