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
running sam local invoke locally throough vs-code. getting this error on method: sam local invoke.
Description:
[*] Deploy: sam deploy --guided --template-file ..\..\..\..\..\..\chris.rodriguez\AppData\Local\Temp\aws-toolkit-vscode\vsctk1eac7a2a\output\template.yaml
2025-01-22 16:14:00.798 [info] Invoking index.handler (nodejs18.x)
2025-01-22 16:14:02.375 [info] Local image is up-to-date
2025-01-22 16:14:02.386 [info] Using local image: public.ecr.aws/lambda/nodejs:18-rapid-x86_64.
2025-01-22 16:14:02.386 [info] Mounting C:\Users\CHRIS~1.ROD\AppData\Local\Temp\aws-toolkit-vscode\vsctk1eac7a2a\output\openbookActivityOperationsEmail as /var/task:ro,delegated, inside runtime container
2025-01-22 16:14:04.320 [info] Error: (109, 'GetOverlappedResult', 'The pipe has been ended.')
Traceback:
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\cli_config_file.py", line 347, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 185, in wrapped
raise exception # pylint: disable=raising-bad-type
^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 150, in wrapped
return_value = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\utils\version_checker.py", line 43, in wrapped
actual_result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\cli\main.py", line 95, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\local\invoke\cli.py", line 108, in cli
do_cli(
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\local\invoke\cli.py", line 209, in do_cli
context.local_lambda_runner.invoke(
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\commands\local\lib\local_lambda.py", line 166, in invoke
self.local_runtime.invoke(
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\lib\telemetry\metric.py", line 325, in wrapped_func
return_value = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\local\lambdafn\runtime.py", line 224, in invoke
container = self.create(
^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\local\lambdafn\runtime.py", line 116, in create
self._container_manager.create(container)
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\local\docker\manager.py", line 96, in create
container.create()
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\samcli\local\docker\container.py", line 240, in create
real_container = self.docker_client.containers.create(self._image, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\models\containers.py", line 935, in create
resp = self.client.api.create_container(**create_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\api\container.py", line 440, in create_container
return self.create_container_from_config(config, name, platform)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\api\container.py", line 456, in create_container_from_config
res = self._post_json(u, data=config, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\api\client.py", line 303, in _post_json
return self._post(url, data=json.dumps(data2), **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\utils\decorators.py", line 44, in inner
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\api\client.py", line 242, in _post
return self.post(url, **self._set_request_timeout(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\requests\sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\urllib3\connectionpool.py", line 536, in _make_request
response = conn.getresponse()
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\urllib3\connection.py", line 507, in getresponse
httplib_response = super().getresponse()
^^^^^^^^^^^^^^^^^^^^^
File "http\client.py", line 1428, in getresponse
File "http\client.py", line 331, in begin
File "http\client.py", line 292, in _read_status
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\transport\npipesocket.py", line 224, in readinto
return self.sock.recv_into(buf)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\transport\npipesocket.py", line 25, in wrapped
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\Lib\site-packages\docker\transport\npipesocket.py", line 152, in recv_into
return win32file.GetOverlappedResult(self._handle, overlapped, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An unexpected error was encountered while executing "sam local invoke".
Search for an existing issue:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
This seems like a Docker named pipes communication error. Did you tried restarting the docker daemon, or restarting the host machine to see if this error still exist. And if the issue still exist, I want to know if the docker is running in WSL2 or in windows?
I'm running this docker locally on my machine. I wasn't able to get it to wsl2 running, I will try and get it to wsl2 and see if error still happens.
Best Regards,
Chris Rodriguez
________________________________
From: Roger Zhang ***@***.***>
Sent: Thursday, January 23, 2025 7:19:39 PM
To: aws/aws-sam-cli ***@***.***>
Cc: Chris Rodriguez ***@***.***>; Author ***@***.***>
Subject: Re: [aws/aws-sam-cli] Bug: TITLE Bug: sam local invoke - error (Issue #7843)
This seems like a Docker named pipes communication error. Did you tried restarting the docker daemon, or restarting the host machine to see if this error still exist. And if the issue still exist, I want to know if the docker is running in WSL2 or in windows?
—
Reply to this email directly, view it on GitHub<#7843 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABBXDQLP3KNNOVG5GOY5ADD2MGWMXAVCNFSM6AAAAABVWECP3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJRGQ3DCOJVGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
roger-zhangg
added
stage/needs-feedback
Needs feedback from the community (are you also interested in/experiencing this?)
blocked/more-info-needed
More info is needed from the requester. If no response in 14 days, it will become stale.
and removed
stage/needs-triage
Automatically applied to new issues and PRs, indicating they haven't been looked at.
stage/needs-feedback
Needs feedback from the community (are you also interested in/experiencing this?)
labels
Jan 24, 2025
running sam local invoke locally throough vs-code. getting this error on method: sam local invoke.
Description:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: