def read_in_file_from_s3()

in files/lambda_code/call_cm_other_models_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)