Last active
November 5, 2016 19:17
-
-
Save bo67192/a7c14d8753d8268ab6b53c6a15535a70 to your computer and use it in GitHub Desktop.
Lambda function logging to Cloudwatch
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
import logging | |
# Setup cloud watch logging | |
logger.setLevel(logging.WARNING) | |
# Create boto3 EC2 resource | |
ec2 = boto3.resource('ec2') | |
def lambda_handler(event, context): | |
logger = logging.getLogger() | |
logger.info('Here we go!') | |
# Interact with boto3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment