def read_in_file_from_s3()

in workshops/Sagemaker_Pipelines_Automated_Retraining/kick_off_pipeline_lambda.py [0:0]


def read_in_file_from_s3(bucketname, filename):
    """reads in the file from S3 and returns the content from the body of the file"""
    s3 = boto3.resource("s3")
    obj = s3.Object(bucketname, filename)
    body = obj.get()["Body"].read()
    return body