import json

def lambda_handler(event, context):
    """
    A simple Lambda function that returns a 'Hello World' JSON response.
    """
    print(f"Received event: {json.dumps(event)}")
    
    # This is the standard response format for a Lambda proxy integration
    return {
        'statusCode': 200,
        'headers': {
            'Content-Type': 'application/json'
        },
        'body': json.dumps({
            'message': 'Hello from Lambda!',
            'event': event # Echo back the event for demonstration
        })
    }
