You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
amazon_1 | nodejs6.10: Pulling from lambci/lambda
amazon_1 | Digest: sha256:7eb4ced6a15ae3c30effc4ec0cd3aabb2bd57c9a8330b37920c3d5d722d81083
amazon_1 | Status: Image is up to date for lambci/lambda:nodejs6.10
amazon_1 |
amazon_1 | Mounting index.handler (nodejs6.10) at http://0.0.0.0:3000/ [OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT]
amazon_1 | Mounting static files from /var/opt/public at /
amazon_1 |
amazon_1 | You can now browse to the above endpoints to invoke your functions.
amazon_1 | You do not need to restart/reload SAM CLI while working on your functions,
amazon_1 | changes will be reflected instantly/automatically. You only need to restart
amazon_1 | SAM CLI if you update your AWS SAM template.
amazon_1 |
But hitting http://localhost:3000/ throws an error:
amazon_1 | 2017/11/01 06:48:24 Invoking index.handler (nodejs6.10)
amazon_1 | START RequestId: a0b9d93e-517e-1bbe-6ffb-d8ad37e1d5db Version: $LATEST
amazon_1 | Unable to import module 'index': Error
amazon_1 | at Function.Module._resolveFilename (module.js:469:15)
amazon_1 | at Function.Module._load (module.js:417:25)
amazon_1 | at Module.require (module.js:497:17)
amazon_1 | at require (internal/module.js:20:19)
amazon_1 | END RequestId: a0b9d93e-517e-1bbe-6ffb-d8ad37e1d5db
amazon_1 | REPORT RequestId: a0b9d93e-517e-1bbe-6ffb-d8ad37e1d5db Duration: 12.61 ms Billed Duration: 0 ms Memory Size: 0 MB Max Memory Used: 28 MB
amazon_1 | 2017/11/01 06:48:45 Function returned an invalid response (must include one of: body, headers or statusCode in the response object): %!s(<nil>)
The files in that folder work fine via sam local start-api, so it’s not a file path issue.
The text was updated successfully, but these errors were encountered:
I got this to work. --docker-volume-basedir needs to reference a path on the host, e.g. /Users/Geoffrey/Sites/project/amazon on my Mac, not /var/opt inside the container as I expected it to be. Submitted #2 to document this as an example for others.
I’m trying to use this in
start-api
mode withdocker-compose
. I have this in mydocker-compose.yml
file:With the code from https://github.com/awslabs/aws-sam-local/tree/develop/samples/api-event-source in
./amazon
. The container starts up, and seems to loadtemplate.yml
just fine:But hitting
http://localhost:3000/
throws an error:The files in that folder work fine via
sam local start-api
, so it’s not a file path issue.The text was updated successfully, but these errors were encountered: