I have a python script which reads an excel file from S3 but getting an error when it's triggered in AWS Batch. The code works fine on another Ubuntu box.
AttributeError: 'StreamingBody' object has no attribute 'seek'
Section of my code to read the excel is below
import boto3
import pandas as pd
session = boto3.Session(aws_access_key_id = config.access_key_id, aws_secret_access_key = config.secret_access_key)
client = session.client('s3')
obj = client.get_object(Bucket = s3_bucket, Key = s3_file)
df = pd.read_excel(obj['Body'],sheet_name=sheet_name, skiprows=1)
Any help is much appreciated.