Hola, buen video. Me podria ayudar con este error { "errorMessage": "Unable to import module 'lambda_function': No module named 'lambda_function'", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }
Are you looking for the create thumbnail handler code if so it is there in the link I have provided. For quick reference check this link s3-us-west-2.amazonaws.com/us-west-2-aws-training/awsu-spl/spl-88/2.3.prod/scripts/CreateThumbnail.zip
Cool code, thanks! When I upload a portrait image taken from my phone the resized image is turned 90 degrees CCW. I'm new to python my efforts to to resolve this issue haven't worked. Any advice?
HI I am getting this error "Error occurred while GetObject. S3 Error Code: AuthorizationHeaderMalformed. S3 Error Message: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'" while save the function.
@@nidhinkumar6222 okay ..now I am getting some error when I test Upload event "{ "errorMessage": "An error occurred (404) when calling the HeadObject operation: Not Found", "errorType": "ClientError", "stackTrace": [ " File \"/var/task/CreateThumbnail.py\", line 22, in handler s3_client.download_file(bucket, key, download_path) ", " File \"/var/task/boto3/s3/inject.py\", line 172, in download_file extra_args=ExtraArgs, callback=Callback) ", " File \"/var/task/boto3/s3/transfer.py\", line 307, in download_file future.result() ", " File \"/var/task/s3transfer/futures.py\", line 106, in result return self._coordinator.result() ", " File \"/var/task/s3transfer/futures.py\", line 265, in result raise self._exception ", " File \"/var/task/s3transfer/tasks.py\", line 255, in _main self._submit(transfer_future=transfer_future, **kwargs) ", " File \"/var/task/s3transfer/download.py\", line 345, in _submit **transfer_future.meta.call_args.extra_args ", " File \"/var/task/botocore/client.py\", line 357, in _api_call return self._make_api_call(operation_name, kwargs) ", " File \"/var/task/botocore/client.py\", line 661, in _make_api_call raise error_class(parsed_response, operation_name) " ] }"
@@vickyadhikari I also such an error when the photos are uploaded in a folder path, but when it's directly in the bucket there is no problem. The photos should be uploaded via SDK into a bucket/folder_path. Is there a way to solve the error?
1:59 how can i configure the output "amazon s3 and cloudwatch logs? because i did the same exercise from qwklabs and It doesnt appeare the same way.
You must be Mr. Bean. Not a word said, yet thoroughly entertained us!
sir article link not opening will you send link
Can you show how to upload an image to s3 bucket using lambda function
Hola, buen video. Me podria ayudar con este error {
"errorMessage": "Unable to import module 'lambda_function': No module named 'lambda_function'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
Sorry, but why do I get this error?
[ERROR] Runtime.ImportModuleError: Unable to import module 'CreateThumbnail': No module named 'CreateThumbnail'
{
"errorMessage": "Unable to import module 'CreateThumbnail': No module named 'CreateThumbnail'",
"errorType": "Runtime.ImportModuleError"
}
there is not code provided in the link you have given in the link.
Are you looking for the create thumbnail handler code if so it is there in the link I have provided. For quick reference check this link
s3-us-west-2.amazonaws.com/us-west-2-aws-training/awsu-spl/spl-88/2.3.prod/scripts/CreateThumbnail.zip
Cool code, thanks! When I upload a portrait image taken from my phone the resized image is turned 90 degrees CCW. I'm new to python my efforts to to resolve this issue haven't worked. Any advice?
Existing role ?
how can i change region?
But our region is different
Can you tell from where we have to copy our function code file zip
For pasting it in "Upload a file amazon s3"
Send source code ?
Hello sir can u help me
Hello 1 Bucket in date YYYY/MM/300/thumnail folder create small image?
HI I am getting this error "Error occurred while GetObject. S3 Error Code: AuthorizationHeaderMalformed. S3 Error Message: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'" while save the function.
S3 bucket should be in us west region
@@nidhinkumar6222 okay ..now I am getting some error when I test Upload event "{
"errorMessage": "An error occurred (404) when calling the HeadObject operation: Not Found",
"errorType": "ClientError",
"stackTrace": [
" File \"/var/task/CreateThumbnail.py\", line 22, in handler
s3_client.download_file(bucket, key, download_path)
",
" File \"/var/task/boto3/s3/inject.py\", line 172, in download_file
extra_args=ExtraArgs, callback=Callback)
",
" File \"/var/task/boto3/s3/transfer.py\", line 307, in download_file
future.result()
",
" File \"/var/task/s3transfer/futures.py\", line 106, in result
return self._coordinator.result()
",
" File \"/var/task/s3transfer/futures.py\", line 265, in result
raise self._exception
",
" File \"/var/task/s3transfer/tasks.py\", line 255, in _main
self._submit(transfer_future=transfer_future, **kwargs)
",
" File \"/var/task/s3transfer/download.py\", line 345, in _submit
**transfer_future.meta.call_args.extra_args
",
" File \"/var/task/botocore/client.py\", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
",
" File \"/var/task/botocore/client.py\", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
"
]
}"
@@vickyadhikari i got same error
@@vickyadhikari I also such an error when the photos are uploaded in a folder path, but when it's directly in the bucket there is no problem. The photos should be uploaded via SDK into a bucket/folder_path. Is there a way to solve the error?
@@nidhinkumar6222 my bucket is somewhere else (not in US WEST 2) and your code works just fine.
how to get zip code
In the description there is an article in that you can find the zip code and sorry for the late reply
Hi ,
What is the zip file you have added in the S3 url?
Can you check the description where I have written an article about it. In that u can find that link
@@nidhinkumar6222 thank you!!
I hope you add more videos 👍
Good video, thank you! Can I control the size of generated image?
I haven't tried it and sorry for the late reply
Hi! Did you manage to change the size?
hiiiiiiiiiii
, i am Anant
START RequestId: 010f9b0d-b2a2-40cb-a881-939536c57c44 Version: $LATEST
Unable to import module 'CreateThumbnail': cannot import name '_imaging'