Ruby
使用 Ruby 3.0 計算 AWS S3 Authorization 簽署值
最近在工作上需要使用 AWS S3 下載檔案,對方給了我關於該 AWS S3 的 Bucket name、Access Key 與 Secret Key,需要按照 AWS S3 的文件前去下載該檔案。 從 AWS 的文件中可以看出來,為了要計算簽署值,需要先準備簽署的本體,本體裡面有一段 CanonicalizedResource,他的格式如下 [ "/" + Bucket ] + <HTTP-Request-URI, from the protocol name up to the query string> + [ subresource, if present. For example "?acl"