将文件从 s3 复制到本地计算机的 AWS CLI 命令失败并显示 InvalidAccessKeyId
大家好,我正在学习 AWS 平台上的教程,但我陷入了必须将一些文件从 s3 复制到本地计算机的困境。我使用以下命令来执行此操作:
aws s3 cp s3://wildrydes-us-east-1/WebApplication/1_StaticWebHosting/website ./ --recursive
但是我得到的是一个错误:
致命错误:调用 ListObjectsV2 操作时发生错误 (InvalidAccessKeyId):您提供的 AWS 访问密钥 ID 在我们的记录中不存在。
Hi folks I am following a tutorial on the AWS platform and I am stuck at a point where I have to copy some files from an s3 to local machine. I used the following command to do that:
aws s3 cp s3://wildrydes-us-east-1/WebApplication/1_StaticWebHosting/website ./ --recursive
However what I get is an error:
fatal error: An error occurred (InvalidAccessKeyId) when calling the ListObjectsV2 operation: The AWS Access Key Id you provided does not exist in our records.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如上面的评论所示,您必须按照教程中的说明创建并使用访问密钥和秘密访问密钥。这将消除当前的错误。但是,您还需要向执行复制的 IAM 用户授予“AmazonS3ReadOnlyAccess”策略并等待 5 分钟。这为 IAM 用户提供了从 S3 读取数据的权限。
As in the comments above, you must create and use an Access Key and a Secret Access Key as described in the tutorial. That will get rid of the current error. However, you will also need to grant the IAM user that is doing the copy the "AmazonS3ReadOnlyAccess" policy and wait 5 minutes. This gives the IAM user permission to read from S3.