Skip to content

Instantly share code, notes, and snippets.

@bo67192
Last active November 5, 2016 19:17
Show Gist options
  • Save bo67192/a7c14d8753d8268ab6b53c6a15535a70 to your computer and use it in GitHub Desktop.
Save bo67192/a7c14d8753d8268ab6b53c6a15535a70 to your computer and use it in GitHub Desktop.
Lambda function logging to Cloudwatch
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