配置 aws cli 使用 fakes3

Ben*_*Ben 5 amazon-s3 amazon-web-services aws-cli

热衷于设置假 s3,通过docker setup让它工作。在端口 4569 上运行。我无法弄清楚如何使用 aws cli(版本 1.10.6)进行测试。特别更改访问的端口。

即想要执行类似的命令

 $ aws s3 cp test.txt s3://mybucket/test2.txt
Run Code Online (Sandbox Code Playgroud)

我需要指定端口,我已经尝试过

  • --port settings on command line: 即AWS_ACCESS_KEY_ID=ignored AWS_SECRET_ACCESS_KEY=ignored aws s3 --profile fakes3 cp test.txt s3://mybucket/test2.txt(表示无效参数)
  • adding a profile and including end_point="localhost:4569在 ~/.aws` 的配置中。给出有关 AUTH Key 的错误
  • 在 443 上运行 fakes3 但随后与我的本地计算机发生冲突

有人让 aws cli 与 fakes3 一起使用吗?

 $ aws s3 --version
 aws-cli/1.10.6 Python/2.7.11 Darwin/15.2.0 botocore/1.3.28
Run Code Online (Sandbox Code Playgroud)

leg*_*cia 3

使用--endpoint-url论证。如果 fakes3 正在侦听端口 4569,请尝试以下操作:

aws --endpoint-url=http://localhost:4569 s3 ls
Run Code Online (Sandbox Code Playgroud)