I am converting the s3 video to hls, in that case if the s3 file name has a space or bracket, it will converted into "+", so if the code search with the "+" in s3 bucket it didn't get object.
def handler(event, context):
assetID = str(uuid.uuid4())
sourceS3Bucket = event['Records'][0]['s3']['bucket']['name']
sourceS3Key = event['Records'][0]['s3']['object']['key']
sourceS3 = 's3://'+ sourceS3Bucket + '/' + sourceS3Key
sourceS3Basename = os.path.splitext(os.path.basename(sourceS3))[0]
My S3 URI is :
s3://bucket_4999/ne gi.mp4
But in lambda i get it as s3://bucket_4999/ne+gi.mp4
So in AWS Elemental MediaConvert, i get the error as
Unable to open input file [s3://bucket_4999/ne+gi.mp4]: [Failed probe/open: [Can't read input stream: [Failed to read data: HeadObject failed]]]