7

Hi i have a sam application which one lambda function and can be invoked from rest endpoint which is working as expected but when i try to test the sam application locally using sam local start-lambda or sam local start-api or sam local invoke i get the error as :

    self.connect()
  File "C:\Users\divyanayan.awasthi\AppData\Roaming\Python\Python37\site-packages\docker\transport\npipeconn.py", line 31, in connect
    sock.connect(self.npipe_path)
  File "C:\Users\divyanayan.awasthi\AppData\Roaming\Python\Python37\site-packages\docker\transport\npipesocket.py", line 22, in wrapped
    return f(self, *args, **kwargs)
  File "C:\Users\divyanayan.awasthi\AppData\Roaming\Python\Python37\site-packages\docker\transport\npipesocket.py", line 50, in connect
    win32pipe.WaitNamedPipe(address, self._timeout)
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specified.')

Sam version used

SAM CLI, version 0.7.0

Is this because i dont have a docker running in my local or some other configuration is required .i have one .py class and template.yml file for SAM application.

divyanayan awasthi
  • 890
  • 1
  • 8
  • 33

1 Answers1

3

Yes we need to install docker locally then sam local works as expected .if you are running sam local on windows then there might a problem to install docker installer as it needs Windows 10 Pro or enterpise version to install.

In case you dont have the above windows configuration then install docker toolbox

https://docs.docker.com/toolbox/toolbox_install_windows/

divyanayan awasthi
  • 890
  • 1
  • 8
  • 33