2014-11-04 22 views
0

我有aws-cli問題,我做了yum更新,它更新了awscli(等等),現在awscli在大文件上失敗(例如5.1 Gb)與SignatureDoesNotMatch。 與小文件完全相同的命令(對同一個存儲桶)起作用。 如果我使用python中的boto,那麼大文件仍然有效。不能使用awscli複製大文件(5 Gb)1.5.4

它複製所有部件,但它看起來像是兩個(即它被計數到745個部件的743個),然後出現錯誤消息。

看起來像awscli中的錯誤? 雖然我谷歌周圍,我無法找到任何關於它。

這全部在ec2實例上執行。

$ /usr/bin/aws --version 
aws-cli/1.5.4 Python/2.6.9 Linux/3.14.20-20.44.amzn1.x86_64 

$ ls -hl 
-rw-rw-r-- 1 user user  4 Nov 4 21:14 small 
-rw-rw-r-- 1 user user 5.1G Nov 4 20:02 big 

$ /usr/bin/aws s3 cp small s3://mybucket/uploaded.ext 
upload: ./small to s3://mybucket/uploaded.ext 

$ /usr/bin/aws s3 cp big s3://mybucket/uploaded.ext 
upload failed: ./big to s3://mybucket/uploaded.ext 
A client error (SignatureDoesNotMatch) occurred when calling the UploadPart operation: The request signature we calculated does not match the signature you provided. Check your key and signing method. 

編輯:以爲我發現它,但仍然有這個問題。我寧願堅持awscli,因爲它是我們用遍代碼,這是相當大的比伯特(至少當它的工作原理)

EDIT2快:它實際上是從每況愈下,我可以重複相同的複製命令在控制檯中,有時會通過,有時它不會

回答

1

aws-cli當然可以處理5GB和更高的上傳。

我推出EC2實例,並能成功地完成它:

$ /usr/bin/aws --version 
aws-cli/1.3.6 Python/2.6.9 Linux/3.10.35-43.137.amzn1.x86_64 

$ dd if=/dev/zero of=small bs=1K count=1 
1+0 records in 
1+0 records out 
1024 bytes (1.0 kB) copied, 0.000388469 s, 2.6 MB/s 

$ dd if=/dev/zero of=big bs=5M count=1000 
1000+0 records in 
1000+0 records out 
5242880000 bytes (5.2 GB) copied, 73.733 s, 71.1 MB/s 

$ aws s3 mb s3://target77 
make_bucket: s3://target77/ 

$ aws s3 cp small s3://target77/small 
upload: ./small to s3://target77/small 

$ aws s3 cp big s3://target77/big 
upload: ./big to s3://target77/big  

$ aws s3 ls s3://target77/ 
2014-11-17 09:44:42 5242880000 big 
2014-11-17 09:44:29  1024 small 

到目前爲止,一切都很好!

我再更新到CLI的新版本,然後再次嘗試:

$ sudo yum update 
... 

$ /usr/bin/aws --version 
aws-cli/1.5.5 Python/2.6.9 Linux/3.10.35-43.137.amzn1.x86_64 

$ aws s3 cp small s3://target77/small 
upload: ./small to s3://target77/small 

$ aws s3 cp big s3://target77/big 
upload failed: ./big to s3://target77/bigs) remaining 
A client error (SignatureDoesNotMatch) occurred when calling the UploadPart operation: The request signature we calculated does not match the signature you provided. Check your key and signing method. 

我重複在同一區域內的EC2實例和S3桶的實驗,並在不同的區域。這兩種情況最終都會導致錯誤,但有時也起作用。

所以,它似乎是與更新的aws-cli問題。另外,當我嘗試重新執行復制命令時,錯誤發生在隨機數量的「零件」之後。

SignatureDoesNotMatch錯誤與安全憑證而不是Amazon S3服務有關。這聽起來與人們在GitHub上報告的問題類似:重複發生SignatureDoesNotMatch client error #995

因此,我建議使用早期版本的aws-cli,直到問題得到解決。

+0

順便說一句,aws-cli是一個叫boto的Python應用程序。 – 2014-11-17 10:20:11

+0

顯然博託1.6有這個修復。 – 2014-11-17 20:26:04

0

如果它是aws-cli中的一個bug,它並不會讓我感到驚訝。我建議使用s3cmd來代替從S3複製文件和進行所有其他基於S3的交互。

+0

謝謝。我們過去在我們的代碼中使用boto,但awscli速度非常快,所以我們切換到了這一點。我會看看s3cmd,看看是否有意義 – 2014-11-05 18:09:13

相關問題