Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sam local invoke doesn't work #2

Open
CJohnsonLehi opened this issue Feb 27, 2020 · 1 comment
Open

sam local invoke doesn't work #2

CJohnsonLehi opened this issue Feb 27, 2020 · 1 comment

Comments

@CJohnsonLehi
Copy link

CJohnsonLehi commented Feb 27, 2020

I cloned the git repo on windows and on my mac.
Running on Python 3.7.3.

Executing
sam local invoke DeserializeDemoFunction
failed with:

Invoking main.lambda_handler (python3.7)
MyLambdaLayer is a local Layer in the template
Building image...
Requested to skip pulling images ...

Mounting C:\code\github\lambda-layers-demo\deserialize-demo as /var/task:ro,delegated inside runtime container
?[32mSTART RequestId: d31162d0-d9f6-1806-6137-12c472e6542e Version: $LATEST?[0m
[ERROR] Runtime.ImportModuleError: Unable to import module 'main': No module named 'deserialize'
?[32mEND RequestId: d31162d0-d9f6-1806-6137-12c472e6542e?[0m
?[32mREPORT RequestId: d31162d0-d9f6-1806-6137-12c472e6542e     Init Duration: 279.32 ms        Duration: 4.90 ms       Billed Duration: 100 ms Memory Size: 128 MB     Max Memory Used: 32 MB  ?[0m

{"errorType":"Runtime.ImportModuleError","errorMessage":"Unable to import module 'main': No module named 'deserialize'"}
@CJohnsonLehi CJohnsonLehi changed the title sam package doesn't work on windows sam local invoke doesn't work on windows Feb 27, 2020
@CJohnsonLehi CJohnsonLehi changed the title sam local invoke doesn't work on windows sam local invoke doesn't work Feb 27, 2020
@Aditya-Rajgor
Copy link

In your logs it says [ERROR] Runtime.ImportModuleError: Unable to import module 'main': No module named 'deserialize'
This means sam isn't able to locate the main.py file, make sure you gave the right path. Double-check the spelling of the 'deserialize' as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants