video-on-demand-on-aws: MediaInfo can't get the Object Key and throwing a signing method error
Hi,
I’m not sure what’s going on but i keep getting this error while executing the mediaInfo Lambda Function.
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>********************</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256
which fails the function while trying to retrieve the uploaded file info with a null exception
[ERROR] TypeError: 'NoneType' object is not subscriptable Traceback (most recent call last): File "/var/task/lambda_function.py", line 157, in lambda_handler raise err File "/var/task/lambda_function.py", line 124, in lambda_handler tracks = json_content['media']['track']
I tried different filenames and extensions .mp4, .mov but i always get the same error any help is appreciated
Thanks, -Kader
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (3 by maintainers)
Thanks for the feedback, we’ve seen the same symptoms and at this point need to engage with the service team to see if we can figure out whats causing this. Thanks for the feedback and you patience.
so i think i got it to work doing the following in that same file (lambda_function.py) after the imports i added AWS_REGION = os.getenv(‘AWS_DEFAULT_REGION’, ‘eu-west-1’)
in def get_signed_url(bucket, obj): // line 102 i changed s3_client = boto3.client(‘s3’) to s3_client = boto3.client(‘s3’, endpoint_url=f’https://s3.{AWS_REGION}.amazonaws.com’, region_name=AWS_REGION)
then zip the function, upload, choose Python 3.7 … btw 3.8 does not work for me
@aloussayef The issue is with the version boto3, and an intermittent one. I have 2 version of VOD running in my account one with the issue and one without. I fixed the error by removing the version of boto3 shipped with the code, defaulting to the version that is installed in lambda.
please try:
Let me know if this works, we’ll continue to look at the problem and get a fix out to the repo.