<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>Web API</h1><figure class="short list"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> </figcaption><ul><li><code>AWS4-HMAC-SHA256</code></li></ul></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML</anchor> を返します。 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JSON</anchor> にする方法はないようです。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> なお、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">非整形式XML</anchor>になることもある模様。</comment-p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ファイル</anchor>の保存と取得だけで複雑なことをしないなら、実は返ってくる <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML</anchor>
を見なくても <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> だけで処理できます。 (エラー処理を考えると結局 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML</anchor>
の中身を見ないといけないのでは、と思ってしまいますが、あまり複雑な処理をさせないただのファイルストレージとして使うなら、
エラーが返ってくるのは本当に想定外の異常の場合だけなので、そのままログファイルに流せばよく、
プログラム的には <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XML</anchor> の中身を見なくて済みます。)</p></section><section><h1>Web ブラウザーからの直接アップロード</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Webブラウザー</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">利用者</anchor>の権限で実行可能な操作を記述する <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">JSON</anchor>
の書き方 <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;16</anchor-internal></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> <cite>Creating a POST Policy - Amazon Simple Storage Service</cite>
(<time>2017-10-13 11:10:46 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html">http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">フォーム</anchor>の例 <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;17</anchor-internal></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> <cite>Examples: Browser-Based Upload using HTTP POST (Using AWS Signature Version 4) - Amazon Simple Storage Service</cite>
(<time>2017-10-13 11:10:46 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html">http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="20" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[20]</anchor-end> ここで使う署名の計算は <code>AWS4</code>。 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web API</anchor> の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>送信時に使うものと同じだけど、
署名する対象が違う。</p><hr></hr><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="21" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[21]</anchor-end> 回数制限はないので、有効期限まで何度でも POST できます。</p></section><section><h1><code class="URI" xml:lang="en">s3:</code> URL scheme</h1><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite xml:lang="en">Feed exports — Scrapy 0.24.5 documentation</cite>
(<time>2015-02-26 06:37:57 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://doc.scrapy.org/en/latest/topics/feed-exports.html#topics-feed-storage-s3">http://doc.scrapy.org/en/latest/topics/feed-exports.html#topics-feed-storage-s3</anchor-external></figcaption><blockquote><p>The feeds are stored on Amazon S3.</p><p>URI scheme: s3</p><p>Example URIs:</p><p>s3://mybucket/path/to/export.csv</p><p>s3://aws_key:aws_secret@mybucket/path/to/export.csv</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="26" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[26]</anchor-end> 
<cite xml:lang="en">nix help-stores - Nix Reference Manual</cite>, <time>2026-03-01T03:13:57.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-help-stores">https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-help-stores</anchor-external></p></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <cite>Amazon S3 REST API Introduction - Amazon Simple Storage Service</cite>
(<time>2017-02-11 04:52:51 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html">https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <cite xml:lang="en">BashtonLtd/apt-transport-s3: S3 transport for APT</cite>
( (<time>2017-05-29 01:35:21 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/BashtonLtd/apt-transport-s3">https://github.com/BashtonLtd/apt-transport-s3</anchor-external></figcaption><blockquote><p>The bucket repo should be specified using an s3:// prefix, for example:</p><p>deb s3://aptbucketname.s3.amazonaws.com/repo/ trusty main contrib non-free</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite>Amazon S3における「フォルダ」という幻想をぶち壊し、その実体を明らかにする | Developers.IO</cite>
(<time>2017-10-12 18:21:03 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://dev.classmethod.jp/cloud/aws/amazon-s3-folders/">https://dev.classmethod.jp/cloud/aws/amazon-s3-folders/</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite>PUT Object - Amazon Simple Storage Service</cite>
(<time>2017-10-12 17:27:50 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html">http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite xml:lang="ja">Amazon S3 専用のアカウントを作ってみよう (フェンリル | デベロッパーズブログ)</cite>
(<time>2017-10-13 14:11:10 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://blog.fenrir-inc.com/jp/2013/01/amazon-s3-iam.html">https://blog.fenrir-inc.com/jp/2013/01/amazon-s3-iam.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite>Amazon S3 バケットの使用 - Amazon Simple Storage Service</cite>
(<time>2017-10-12 17:27:57 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/UsingBucket.html">http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/UsingBucket.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <cite>Website Endpoints - Amazon Simple Storage Service</cite>
(<time>2017-10-12 17:27:50 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html">http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">S3</anchor> で (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">S3</anchor> だけで) <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">独自ドメイン</anchor>を使う場合は、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">S3</anchor> バケット名を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ドメイン名</anchor>にする必要があります。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> ただし <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">独自ドメイン</anchor>の<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">TLS証明書</anchor>が提供されるわけではありませんし、
設定する方法も用意されていません。しかも<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ワイルドカード証明書</anchor>は深い階層まで対応していないので、
<code>foo.test.s3.amazonaws.com</code> のような名前でのアクセスもクライアント側で <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">service identity</anchor>
エラーになってしまいます。
クライアント側のエラーを回避したいときは <code>https://s3.amazonaws.com/foo.test/</code>
のような形式の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">URL</anchor> を使うと良いです。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> <cite>バケットポリシーの例 - Amazon Simple Storage Service</cite>
(<time>2017-10-13 11:11:43 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/example-bucket-policies.html">http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/example-bucket-policies.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="22" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[22]</anchor-end> <cite>Amazon S3 イベント通知の設定 - Amazon Simple Storage Service</cite>
(<time>2017-10-13 11:11:43 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/NotificationHowTo.html">http://docs.aws.amazon.com/ja_jp/AmazonS3/latest/dev/NotificationHowTo.html</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="23" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[23]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>の <code>x-amz-version-id</code> の値を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求URL</anchor>
の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">query</anchor> の <code>versionId</code> に指定すると、その版が返ってきます。
先頭一致でチェックしているようです。
<time>2017-11-17T06:04:55.800Z</time></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="24" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[24]</anchor-end> <cite xml:lang="en">aws s3 ls - find files by modified date? · Issue #1104 · aws/aws-cli</cite>
(<time>2019-11-03 16:56:54 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/aws/aws-cli/issues/1104">https://github.com/aws/aws-cli/issues/1104</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="25" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[25]</anchor-end> 
<cite xml:lang="en">GitHub - s3tools/s3cmd: Official s3cmd repo -- Command line tool for managing Amazon S3 and CloudFront services</cite>, <time>2023-07-16T11:21:13.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/s3tools/s3cmd">https://github.com/s3tools/s3cmd</anchor-external></p></section></body></html>