0

I am actually writing a simple script to zip a local game save then upload the zip file into my s3 bucket.

Somehow it gives me this error though. The most I can find googling around is about filesize + adding --region init which doesn't help at all.

somehow for testing, I created an empty folder, with just a random text file with random words in it. Let's call the folder name AA

I zipped it using zip -r filename.zip AA the zip works fine

Then I do the s3 cp as such

aws s3 cp filename.zip s3://BUCKET_NAME/public/ --profile myProfile

This works fine though, then I changed the folder name to my game save name let's say it's called BB then I did aws s3 cp filename.zip s3://BUCKET_NAME/public/ --profile myProfile again then I get the error of

upload failed: ./filename.zip to s3://BUCKET_NAME/public/filename.zip ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

The folder is only approx 5mb and after zipped, it's approx 500kb. So size wouldn't have been the matter even though I did try to get the ./aws/config and add the bandwith.

If I create another new folder with random files inside let's say folder name is CC. It would work.

If I changed the folder name of the actually folder I want to upload after zipped. I get the same error.

Is there any restriction on what files can / cannot be uploaded to aws? Or else what might be the reason? I can't really think of much though.

Thanks in advance for any suggestions / advices.

Dora
  • 341
  • 1
  • 5
  • 15
  • If this works uploading a random text file and doesn't work when you change the local filename then the problem is most likely on your PC. – Tim Aug 08 '19 at 21:35
  • @Tim is there a possible way to easily test it out what might be causing it? – Dora Aug 08 '19 at 21:44
  • @Tim this is weirder...I was trying to zip and upload folder by folder to see which one is causing the problem up to the last file it was still fine. Then if I added the last file it didn't work. Somehow I did not give up and try again, then it WORKED. But only for once O.o – Dora Aug 08 '19 at 22:09
  • Can't really help much more with limited information. AWS CLI doesn't have verbose output available. Try it on another machine / network to see what happens. – Tim Aug 08 '19 at 22:26
  • @Tim guess that's the only thing to try then. Don't even know what kind of info I can provide :( – Dora Aug 08 '19 at 22:59
  • Assume you've googled it. Someone else may be able to help. I find AWS support very helpful, but it's not free – Tim Aug 09 '19 at 00:58
  • Can you provide more information in your question--what platform are you on? What version of the cli are you using? Also, what exactly are you trying to do and why? What commands would I type to duplicate the problem? From googling, it looks like updating the cli may resolve the issue in some cases. To determine the version of the cli you're using, try "aws --version" It looks like the latest version right now is 1.16.215 – vjones Aug 09 '19 at 21:03

0 Answers0