如何測試特定檔案大小的 Amazon S3 Transfer Acceleration 的上傳速度?

1 分的閱讀內容
0

我想使用 S3 Transfer Acceleration 來提高檔案上傳至 Amazon Simple Storage Service (Amazon S3) 儲存貯體的速度。我還想比較直接上傳至 S3 儲存貯體與使用 S3 Transfer Acceleration 之間的速度。

解決方法

若要比較 Amazon S3 區域的一般上傳速度,請使用 Amazon S3 Transfer Acceleration 速度比較工具。若要測試特定檔案大小的上傳速度,請使用 Amazon Web Services – 實驗室 GitHub 網站中的 test-upload.sh

在執行 ** test-upload.sh 之前**,您必須符合下列要求:

  1. 檢閱您的 AWS Identity and Access Management (IAM) 使用者憑證,確保您擁有啟用 Transfer Acceleration 的權限。您需要 s3:PutAccelerateConfiguration 權限才可啟用或停用 Transfer Acceleration。此外,您還需要 s3:GetAccelerateConfiguration 權限才可檢視 Transfer Acceleration 在儲存貯體中是否啟用。如需詳細資訊,請參閱使用 Transfer Acceleration 的需求
  2. 在 S3 儲存貯體上啟用 Transfer Acceleration
  3. 在機器上安裝設定 AWS Command Line Interface (AWS CLI)。
    **注意:**如果您在執行 AWS Command Line Interface (AWS CLI) 命令時收到錯誤訊息,請參閱 AWS CLI 錯誤疑難排解。此外,請確定您使用的是最新的 AWS CLI 版本

test-upload.sh 的需求

在執行 test-upload.sh 之前,請先在 Linux 機器上安裝 bc 語言:

Ubuntu 或 Debian

apt-get install bc

Amazon Linux、CentOS、Red Hat Enterprise Linux (RHEL) 或 Fedora

yum install bc

macOS 機器上 test-upload.sh 的需求

在執行 ** test-upload.sh** 之前,請使用 Homebrew 在 macOS 上安裝 coreutils

  1. (選用) 如果您尚未安裝 Homebrew,請遵循 Homebrew 網站上的安裝指示進行操作
  2. 透過 Homebrew 安裝 coreutils
    brew install coreutils

相關資訊

使用者和角色政策範例

使用 AWS CLI 啟用和使用 S3 Transfer Acceleration

AWS 官方
AWS 官方已更新 6 個月前