- Newest
- Most votes
- Most comments
The problem disappears on TX2 (also running JetPack 4.2).
I guess Greengrass is still somehow not very compatible with Nano then?
Was boto3 installed globally or locally for the nvidia user?
Another option would be to bundle the boto3 library along with the lambda.
Hi,
Boto3 is installed both globally and for Nvidia user.
It's OK. I will just use TX2 instead of Nano.
Edited by: Adrian-LI on Jun 24, 2019 10:10 AM
Hi ,
We're investigating the issue. Presently, Greengrass has been tested on the TX2.
What's the output of:
pip install boto3
python --version
python3 --version
Thanks,
KR-AWS
I faced the same error in my Jetson Nano. It was caused because boto3 was installed for Python 3.6 but NOT for Python 2.7. To solve it, you have to make sure you're installing it for 2.7 version:
This shall output Python 2.7:
python --version
Next, run below commands:
sudo apt-get install python-pip
sudo python -m pip install boto3
To test it, simply start a new terminal and type:
python
import boto3
Regards.
Hello,
One way to make sure you don't run into import not found is to bring the dependency with your lambda code.
in the root of your zip file for your lambda code, something like:
pip install boto3 -t .
Thanks,
Reda
I am getting an error [FATAL]-lambda_runtime.py:108,Failed to import handler function "ModbusMasterLambda.function_handler" due to exception: No module named boto3 with Greengrass
version Greengrass-Linux-armv7l-1.8.2.tar.
lambda Python 2.7
I also tried with the deployment package(Layer) but the issue is the same.
facing this issue with Greengrass only
Thank You
Visual
Hi visual,
Did you try the above:
This shall output Python 2.7:
python2.7 --version
Next, run below commands:
sudo apt-get install python-pip
sudo python2.7 -m pip install boto3
What OS are you running?
Thanks,
KR-AWS
Hi KR-AWS
Thanks for your response.
I am getting this error on AWS Lambda and as per AWS Documents
Link:https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
"If your function depends on libraries other than the SDK for Python (Boto 3), install them to a local directory with pip, and include them in your deployment package"
facing this issue with Greengrass only. individually the functionality is working without Greengrass.
But I also tried using the deployment package.
Thanks
Visual
Edited by: visual on Jan 8, 2020, 9:19 PM
Edited by: visual on Jan 8, 2020 9:27 PM
Hi Visual,
Greengrass doesn't follow exactly what Lambda on the cloud does, for example Greengrass does not bundle boto3 library; you must include it yourself in the zip file that you upload to Lambda. The easiest way to do this is to navigate to your own code and then do
pip install -t . boto3
which will install boto3 and all of its dependencies into your current directory. Then you can zip up all the code and put it on Lambda. The layout of your zip file should look like
your_code.py, boto3 (directory), botocore (directory), ... other files and directories
Hopefully that makes sense. You can follow this guide for using boto3 and other AWS services from Greengrass: https://docs.aws.amazon.com/greengrass/latest/developerguide/create-config-lambda.html
--
Michael
Edited by: MichaelDombrowski-AWS on Jan 9, 2020 9:49 AM
Additionally, Greengrass does not use Lambda layers, so all of your code that you need to be deployed to Greengrass must be in the lambda function zip itself and not in a layer.
Hi MichaelDombrowski-AWS,
Thanks a lot for your response. finally the issue is resolved.
Relevant content
- asked a year ago
- Accepted Answerasked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago