Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Benoît Mariaux benoitMariaux

🏠
Working from home
  • Saint-Gobain
  • Paris - France
View GitHub Profile
@gene1wood
gene1wood / log_aws_lambda_event_and_context.py
Last active Feb 18, 2020
A python AWS Lambda function which logs the contents of the event and context variables passed into the function.
View log_aws_lambda_event_and_context.py
from __future__ import unicode_literals
import logging
import json
logger = logging.getLogger(__name__)
logging.getLogger().setLevel(logging.INFO)
class PythonObjectEncoder(json.JSONEncoder):
"""Custom JSON Encoder that allows encoding of un-serializable objects
You can’t perform that action at this time.