Debug the Lambda function on AWS-SAM-LOCAL in Eclipse #92
Comments
Hey @addictedanshul, thanks for reaching out to us. From the error message, it seems that you are not running your docker. SAM Local asks for docker to be running as a daemon. See here for detail. Let me know if you still have this problem after trying running docker in the backend. |
Hi zhangzhx My docker daemon is definitely running as I ran it using Docker Quickstart Terminal. But when I ran "docker ps" from cmd, it gave same error I resolved it by running command as below and "docker ps" started giving output Now eclipse is also giving same error but I don't know how to resolve it there (screenshot attached). |
Hey @addictedanshul, I found a similar issue reported here aws/aws-sam-cli#158. I'm wondering what docker version and SAM version you are using? Can you upgrade to the latest version and try again? |
Hi @zhangzhx I am using latest SAM 0.2.4 and The issue which you referenced aws/aws-sam-cli#158 has two issues reported. I am getting first one "open //./pipe/docker_engine: The system cannot find the file specified". It is in Eclipse where I am still getting the same error (screenshot attached in previous post.) |
@kpjofficial When I received the exception above, the console output in Eclipse contained the attached sam error: To resolve it, I created a ~/.aws/config file with the desired region. @zhangzhx it seems like issue #86 has been addressed but requires the ~/.aws/config file now. |
@kpjofficial it looks like this exception happens even when the ~/.aws/config file exists, so I created a pull request. |
Followed below steps:
Eclipse lambda project not able to connect to docker image on my windows system
lambci/lambda:java8
Got below error in eclipse:
[AWS Toolkit] Running command: C:\Users\XXXXXXX\AppData\Roaming\npm\sam.exe local invoke ExampleFunction --debug-port 5858 --event D:\Projects\lambda-worker\src\test\resources\s3-event.put.json --profile default --template D:\Projects\lambda-worker.serverless.template
[AWS Toolkit] Waiting for SAM Local to attach the port 5858
2017/12/22 15:35:56 Successfully parsed D:\Projects\lambda-worker.serverless.template
2017/12/22 15:35:56 Running AWS SAM projects locally requires Docker. Have you got it installed?
2017/12/22 15:35:56 error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/_ping: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
[AWS Toolkit] SAM Local invocation done.
The text was updated successfully, but these errors were encountered: