1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gsutilからS3互換API経由でGCSにアクセスする

1
Last updated at Posted at 2017-10-27

GCSのInteroperability APIをgsutilから使いたいと思ったものの、ネット上にはAWS CLIの例しか見当たらなかったのでメモ。

まず$HOME/.botoを作成。

.boto
[Credentials]
aws_access_key_id = <ACCESS_KEY_ID>
aws_secret_access_key = <SECRET_ACCESS_KEY>

[s3]
host = storage.googleapis.com

この状態で下記のようにすればGCSにアクセスできます。

$ gsutil cp -r s3://<GCS_BUCKET_NAME>/<PATH> ./

参考URL

互換をうたう以上当然だが、GCSのエンドポイントは<bucket>.storage.googleapis.com形式のバーチャルホストにも対応している。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?