0

I am running the AWS Step by step guide for following link.

I am currently on Step 4. - Create the Lambda function that splits input data

I am running on a Windows 10 machines with Python installed:

pip 20.2.3 -  (python 3.9)

The Lambda function on AWS is failing with following:

{
  "errorMessage": "Unable to import module 'lambda_function': No module named 'fsspec'",
  "errorType": "Runtime.ImportModuleError"
}

Function Logs

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'fsspec'

Please recommend any solution.

samtoddler
  • 6,742
  • 2
  • 19
  • 18
Amresh Kadian
  • 171
  • 1
  • 1
  • 11
  • 1
    have you looked at this? https://stackoverflow.com/questions/35340921/aws-lambda-import-module-error-in-python – sagar1025 Jan 31 '21 at 04:59
  • 1
    Can you show your actual lambda code? – Marcin Jan 31 '21 at 05:25
  • 1
    if you are following the guide then in this [Step 3: Create a package that contains the required Python libraries](https://docs.aws.amazon.com/pinpoint/latest/developerguide/tutorials-importing-data-create-python-package.html) in #3.8 describes how to package your dependencies. Please check if your uploaded zip to lambda has the dependecies packaged. – samtoddler Jan 31 '21 at 15:14

1 Answers1

-1

The issue was with the file permissions. I was zipping the files on Windows 10 machine and due to some reason the files are not having execute permission. The function is able to run once the permissions are set correctly using a Mac:

Commands used - 

 1. chmod -R +x *.py
 2. zip xyz.zip *
Amresh Kadian
  • 171
  • 1
  • 1
  • 11