如何使用aws-cli访问Google Cloud Storage存储桶

Pez*_*Pez 6 amazon-s3 amazon-web-services google-cloud-storage aws-cli google-cloud-platform

我可以访问aws和Google Cloud Platform.

这有可能做到以下几点,

  1. 使用aws-cli列出Google Cloud Storage存储桶
  2. 使用aws-cli将CSV文件输入Google Cloud Storage存储桶
  3. 使用aws-cli从Google Cloud Storage存储桶中获取对象

use*_*867 9

有可能的.每个GCP文档

Cloud Storage XML API可与Amazon Simple Storage Service(Amazon S3)等服务互操作

为此,您需要Interoperability在Google云端存储控制台的"设置"屏幕中启用.从那里,您可以创建存储访问密钥.

aws使用这些键配置cli.IE aws configure.

然后,您可以使用标志设置为的aws s3命令.--endpoint-urlhttps://storage.googleapis.com

例如:

MacBook-Pro:~$ aws s3 --endpoint-url https://storage.googleapis.com ls
2018-02-09 14:43:42 foo.appspot.com
2018-02-09 14:43:42 bar.appspot.com
2018-05-02 20:03:08 etc.appspot.com

 aws s3 --endpoint-url https://storage.googleapis.com cp test.md s3://foo.appspot.com
 upload: ./test.md to s3://foo.appspot.com/test.md  
Run Code Online (Sandbox Code Playgroud)


jar*_*man -5

不幸的是这是不可能的,

您能否将您的问题更新为为什么要这样做,也许我们知道您问题的替代解决方案?