This file contains hidden or 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
import os | |
import boto3 | |
HOSTED_ZONE_ID = "ABCDEF123456789" | |
DOMAIN_NAME = ".example.lan." | |
def lambda_handler(): | |
# Setup Boto3 client | |
boto3.setup_default_session(region_name='us-east-1') | |
ec2 = boto3.client("ec2") |
This file contains hidden or 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
# Backport subprocess.run for Python 3.3 and 3.4 | |
import subprocess | |
if not 'run' in subprocess.__all__: | |
class CompletedProcess(object): | |
def __init__(self, stdout, stderr, returncode): | |
self._stdout = stdout | |
self._stderr = stderr |
NewerOlder