main/app.py
def lambda_handler(event, context):
    # shared attributes
    s3_endpoint = os.environ.get('S3_ENDPOINT', 'http://s3.amazonaws.com/')
    s3_bucket = event.get("bucket")
    s3_key = event.get("key")

    """
    stream reading and writing with boto3
    """
    read_and_persistence_with_boto3(s3_endpoint, s3_bucket, s3_key)

    """
    stream reading and writing with smart_open
    """
    read_and_persistence_with_smart_open(s3_endpoint, s3_bucket, s3_key)

    return {
        "statusCode": 200,
        "body": json.dumps({
            "message": event,
        }),
    }

    stream reading and writing with boto3
    
stream reading and writing with boto3
stream reading and writing with boto3
def lambda_handler(event, context):
    s3_endpoint = os.environ.get('S3_ENDPOINT', 'http://s3.amazonaws.com/')
    s3_bucket = event.get("bucket")
    s3_key = event.get("key")
    read_and_persistence_with_boto3(s3_endpoint, s3_bucket, s3_key)
    read_and_persistence_with_smart_open(s3_endpoint, s3_bucket, s3_key)
    return {
        "statusCode": 200,
        "body": json.dumps({
            "message": event,
        }),
    }
def lambda_handler ( event , context ) : s3_endpoint = os . environ . get ( 'S3_ENDPOINT' , 'http://s3.amazonaws.com/' ) s3_bucket = event . get ( "bucket" ) s3_key = event . get ( "key" ) read_and_persistence_with_boto3 ( s3_endpoint , s3_bucket , s3_key ) """
    stream reading and writing with smart_open
    """ read_and_persistence_with_smart_open ( s3_endpoint , s3_bucket , s3_key ) return { "statusCode" : 200 , "body" : json . dumps ( { "message" : event , } ) , }
stream reading and writing with boto3
stream reading and writing with boto3
# shared attributes """
    stream reading and writing with boto3
    """ """
    stream reading and writing with smart_open
    """
event
context