in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_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)