Windows EC2中的AWS CLI无法使用角色访问S3 [英] AWS CLI in Windows EC2 cannot use role to access S3

查看:780
本文介绍了Windows EC2中的AWS CLI无法使用角色访问S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对AWS非常陌生。我创建了一个IAM角色,该角色具有对 S3 的完全访问权限。我将此角色分配给了 Windows Server EC2实例。然后,我在该实例上安装了 CLI 。然后,我使用RDP远程进入该实例,并启动CMD窗口,并输入

I am very new to AWS. I created an IAM role which has full access to S3. I assigned this role to a Windows Server EC2 instance. I then installed CLI on that instance. I then remoted into that instance using RDP, and started a CMD windows, and typed in

aws s3 ls

它抱怨

Unable to locate credentials. You can configure credentials by running "aws configure".

现在,此EC2已被分配了可以完全访问S3的角色,为什么我不能直接访问S3吗?

Now that this EC2 has been assigned the role that has full access to S3, why can't I directly access S3?

推荐答案

感谢约翰·罗滕斯坦(John Rotenstein)的帮助。您为我指出了正确的方向。我从头开始创建了一个新实例,一切正常。我在以前的实例上安装了IIS和ASP.NET。可能是原因吗?

Thank you John Rotenstein for your help. You pointed me to the right direction. I created a new instance from scratch, and everything worked. The previous instance I installed IIS and ASP.NET on it. Would it be possibly the reason?

这篇关于Windows EC2中的AWS CLI无法使用角色访问S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆