New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Connection was closed before we received a valid response from endpoint URL #3842
Comments
I am still experiencing this problem. Any suggestions? |
@moldstadt - Thank you for reaching out. Since this use to work as expected it is possible the file size has increased and exceeded the Lambda limitation. Please let us know if the file size is greater than 50 MB. Also, thanks for providing the debug output in your initial response. It appears only part of the debug was provided and I'm not able to determine the CLI version in use. If the file size has not exceeded the Lamdba limits and this issue continues, please provide a more of the debug output. Also, you can try the following:
|
@justnance Thanks for the feedback. The zip file is only 11MB (67MB uncompressed). The CLI version is 1.16.17. Here is a more complete debug log:
Output from aws history:
I am still experiencing the problem today. Please advise further. Edit: Updating to the latest version of aws cli (1.16.88) yields the same results. |
I'm still experiencing this problem. What could the problem be? I have tried re-uploading an unchanged project of about the same size, and that works fine. |
@moldstadt - Thank you for your feedback and patience. Based on the debug logs and the history output it appears there is a network issue or timeout. Is there a difference in the network between the changed and unchanged project? |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
@moldstadt did you ever manage to resolve this? I'm a couple of hours into debugging the same issue 😣 Thanks! |
I am having this issue as well when trying to deploy new lambda code. |
I am having a similar issue when deploying to elastic beanstalk. I am working with PowerShell on Windows with the following version: The repeated error is: |
Still having the same issue today. Other lambda commands are usable through the cli, but
I can confirm this error happens in all regions I've tested uploading code to (us-east-1, us-east-2, eu-west-2). I've also reinstalled awscli with no change. current version: Hopefully this issue will be reopened as it seems like more people are experiencing this. |
For what it's worth, my issue seemed to resolve itself after a few hours. The command that finally worked was adding the For posterity sake, these are the things I tried, which did not solve the issue:
It is worth noting as well that my team was able to run the command (even using my IAM credentials) while this problem was occurring, so it's very likely to be an issue with the computer, and not the AWS CLI. |
I'm still experiencing this problem. Some times it works, other times it
doesn't.
…On Wed, 27 Mar 2019, 15:46 William Pelrine ***@***.***> wrote:
For what it's worth, my issue seemed to resolve itself after a few hours.
The command that finally worked was adding the --debug flag to the update
function code command, but I'm fairly certain this had little to do with
the resolution.
For posterity sake, these are the things I tried, which *did not* solve
the issue:
1. Running with a different Access Key/Secret
2. Running as a different IAM user
3. Running on a different network
4. Running on a newer version of the AWS CLI (1.16.130)
5. Restarting my computer
It is worth noting as well that my team was able to run the command (even
using my IAM credentials) while this problem was occurring, so it's very
likely to be an issue with the computer, and not the AWS CLI.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3842 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVoOPyfE30twp3uA1Vzo0SsaHfNd-6uWks5va3YhgaJpZM4Z5fYF>
.
|
Also experiencing this problem Have tried running with --debug flag to no effect. @moldstadt are you a mac osx user? and did you install with homebrew? |
@moldstadt @inci90 and anyone else experiencing the above problem, I was able to resolve it by connecting to another wifi network. This is weird but the upload always works with/without the |
It appears this issue is related to a local computer or network issue and not related to the CLI. I'm closing this issue for now but can reopen if there are specific steps we can do to reproduce the issue. |
The issue has disappeared for me now. Can confirm it appears to be a network issue. I moved to another wifi network and the issue fixed itself. |
@inci90 - Thanks for the update. |
I have had to retry the upload a number of times to get around this. I believe that one needs a fast enough upload speed to usually avoid this message. Otherwise, it is a persistent issue, because the signature seems to expire DURING the upload. |
Turning off Mac bitdefender AV didn't help but --cli-connect-timeout 6000 fixed it for me. File size only 10 MB, rural DSL internet cxn (15 down, 1 up). |
Looks like just a timeout due to a slow network and relatively large upload. |
I'm having this issue as well, and none of the answers address my issue.
I will switch over the Always fails at roughly
|
In case it helps someone, I tried this and it works for when I'm in a rural area. I changed the python library code to retry several times. For some reason, in my rural location it always goes on the 4th retry. But when I was at a hotel with bad wifi, it still wouldn't go. Change file /lib/python3.8/http/client.py - here's the whole send() method, with my change marked with a comment:
|
Home network with corp security proxy that gives a slow connect time. Version: Other aws lambda commands work. Just aws lambda update-function-code times out. |
Please upvote / comment on the feature request to make See #5754 |
Hey, I ran into this issue also and found that updating botocore to the latest version resolved it for me. |
Interesting, thanks. I ended up setting up an intermediate host at
Vultr.com. I change code locally, commit to github, update the code on the
intermediate host, and upload from there in 5 secs to AWS. The heavy
lifting upload happens there, sidestepping this issue.
…On Fri, Jan 8, 2021 at 2:54 AM Nohclu ***@***.***> wrote:
Hey, I ran into this issue also and found that updating botocore to the
latest version resolved it for me.
Hope this can be of use to someone.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3842 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDDXTJWPLPZPXMYW3U3CHTSY3P75ANCNFSM4GPF6YCQ>
.
|
My only solution was to downgrade the modules used to version that work. Awscli 1.18.177 and botocore 1.19.17 will not work (and higher) ....tried all of the workarounds here. Would love this to be fixed in the latest awscli:- pip install awscli==1.18.176 |
Hi all, thanks for all the insight on this thread. This is a bug, why is it closed? The default timeout is too small and the error says 'Connection was closed...' has nothing to do with the actual problem: the operation was arbitrarily cancelled before the upload finished because it was too slow. The error should say: "operation was cancelled before upload finished (increase timeout?)" at the very least. |
AWS closed it "as designed" in one of the dup issue threads. And stated that increasing the default might break other developers' uses of the SDK. I think both decisions are mistaken, but this ain't a democracy. /Larry |
|
I have been experimenting the same problem, and I found the solution by changing the internet network from my local wifi to my mobile connection. |
add --region fixed my issue |
Has this been resolved yet? Im still seeing this issue regardless of whether I use |
Facing something similar:
--region didn't fix my issue either. I have Python |
I'm having the same issue when trying to upload multiple 40+ mb functions at the same time. If I do one by one they are uploaded successfully but doing 4 at the time will return the error for all of them. With the |
For what it's worth
What did not work:
What finally worked:
So problem appeared to be caused by a weak internet connection |
I had this problem many other times, and it was always resolved when I restarted my internet modem. Don't ask me why! |
Same issue but I have 400mb upload. Everything was fine 4 days ago. Trying to upload using browser but it's stuck for few minutes... |
Solved this by just moving from wifi X to wifi Y. |
Mine happened when I'm uploading with mobile hotspot with 1Mbps, adding --cli-connect-timeout 600 worked. |
Adding --cli-connect-timeout 6000 is worked for me |
I am having the same problem. So basically, when I start localstack docker then it is working. Then I can run some aws commands. However, as soon as I started to use one of my service which will consume localstack then it does not work any more. I tried to add --cli-connect-timeout, upgrading boto3, botocore but it does not work at all. But when I shutdown my laptop then it is working again. Hence the issues happen again. I am using
Any ideas for that issue? |
Incase it is helpful to anyone, I was able to move past this issue by Pausing file uploads in OneDrive (Windows system). |
I am receiving the above error when trying to upload my code to Lambda using the cli:
This was working fine a couple of days ago, but today it just keeps failing.
Here is a piece of the debug logs, where the error is thrown:
It retries a few times but continually fails. It finally fails with the following error:
What is the problem?
The text was updated successfully, but these errors were encountered: