Sagemaker saving inference to s3

174 Views Asked by At

I've been trying to find an example on how to upload image file to s3 from inference.py script. I used my regular boto3 but it's giving me error.

import boto3
s3 = boto3.resource('s3')
bucket='s3:{bucket}'
object_name= file_name
s3_url = s3_client.upload_file(file_name, bucket, object_name)

It's complaining that it can't find boto3. Is it not allowed to import boto3 from inference.py?

invokeEndpoint operation: Received server error (500) from model with message \"No module named 'boto3'\n
0

There are 0 best solutions below