Closed Homulvas closed 6 years ago
Having a similar issue on OSX with both python2.7 and python3.6 runtime inits;
2018-06-03 02:50:25 Mounting /Users/me/sam-app/hello_world/build as /var/task:ro inside runtime container
START RequestId: b3b0970a-23f3-462c-8f75-0956497dbe1f Version: $LATEST
Unable to import module 'app': No module named 'app'
END RequestId: b3b0970a-23f3-462c-8f75-0956497dbe1f
REPORT RequestId: b3b0970a-23f3-462c-8f75-0956497dbe1f Duration: 1 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 18 MB
2018-06-03 02:50:26 No Content-Type given. Defaulting to 'application/json'.
2018-06-03 02:50:26 127.0.0.1 - - [03/Jun/2018 02:50:26] "GET /hello HTTP/1.1" 200 -
2018-06-03 02:50:26 127.0.0.1 - - [03/Jun/2018 02:50:26] "GET /favicon.ico HTTP/1.1" 403 -```
@Homulvas We had some issues with zip files, details can be found here: #389. Windows with Docker Toolbox also is having some problems, details here: #461
Since you are on Windows 10, the recommendation would be to upgrade to Windows for Docker and upgrade the CLI to the latest. This should solve everything for you.
@keremgocen Upgrade your CLI if you are on version 0.3.0. If that isn't the issue, then make sure you CodeUri is point to a directory where all your code and dependencies are installed to. There is a really good example of how you can setup python if you run sam init --runtime python
and follow the README that is generated in the folder.
Closing since this is a duplicate of a couple issues we have resolved (#461 is not resolved but upgrading to Windows for Docker from Docker Toolbox will work).
Description:
I have tried to run some example .net core code with AWS SAM today however I ran into the same error on two win10 machines that I have tried this with. Leading me to believe that it wasn't really a configuration issue as one of those machines had a nearly fresh Windows install. I had some issues before with the path specified in the template file but once I fixed that I started getting similar errors with path to the TEMP directory that is probably taken from the environment variables. Also this happens for both dotnet core and js lambdas so it's probably not related to the runtime.
Steps to reproduce the issue:
Observed result:
Expected result:
Lambda code is invoked succesfully
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Windows 10
Output of
sam --version
:SAM CLI, version 0.3.0