如何使用 IAM 用户帐户下载 EC2 X.509 证书?
通过 AWS Identity and Access Management,我在我的 CTO(他获得了一些资金)的 AWS 账户中拥有了一个用户账户。
我想使用这个 IAM 用户帐户来设置我自己的实例以通过 ssh 连接到它并运行一些 BeautifulSoup python 脚本。
但是,按照本教程,当到达我需要转到安全凭证 页面,我无法访问此页面,但我被告知可以访问无权查看它。
我向 IAM 经理检查了我的权限,我拥有管理权限,最高的许可权限(在我看来)。
我该怎么做才能获得此 X.509 证书?
Through the AWS Identity and Access Management, I have a user account to the AWS account of my CTO (who is credited with some money).
I wanted to use this IAM user account to set up my own instances to ssh to it and run some BeautifulSoup python scripts.
However, following this tutorial, when arriving to the part where I need to go on the Security Credentials page, I can't access this page and I'm told I do not have the authorization to view it.
I checked my permissions with the IAM Manager, and I have administration rights, the highest possible clearance (so it seems to me).
What can I do to get this X.509 certificate ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
前言
首先,您可能需要重新考虑是否真的需要这些 X.509 证书 - 本教程原则上是正确的:
然而,如今大多数现代 API 和工具仅通过访问密钥而不是 X.509 证书与 AWS 进行交互。
不幸的是,本教程所基于的 EC2 API 工具并非如此,它确实需要使用 X.509 证书,因为它(大部分)仍然基于较旧的 EC2 SOAP API。<更新:EC2 API 工具同时也支持 AWS 访问密钥,相应地不推荐使用 X.509 证书:
替代方案
不过,您可能想先查看替代方案:如果您熟悉 Python,我强烈推荐优秀的 boto(Amazon Web Services 提供的当前和未来基础设施服务的集成接口),与访问密钥配合得很好,提供与 EC2 API 工具几乎相同的功能集 em>(以及大多数其他 AWS API),由于针对的是仅限较新的 AWS REST API。
解决方案
AWS Identity and Access Management (IAM) 不支持访问实际的 AWS 账户,仅涵盖 AWS 管理控制台,当然还有大多数 AWS API。您需要使用 AWS 账户的登录名和密码(即账户所有者的登录名和密码)登录才能访问 安全凭证页面。
不过,不再建议这样做(请参阅IAM概念<中的安全凭证部分/a>):
但是,您仍然可以通过使用您自己的证书来实现您的目标,如 X.509 证书部分中进一步概述的那样:
如何实际执行后者在上传签名证书中进行了说明。
Preface
First and foremost, you might want to reconsider whether you actually need these X.509 certificates - the tutorial is correct in principle:
However, nowadays most modern APIs and tools are interacting with AWS by means of access keys only rather than X.509 certificates.
Unfortunately this is not the case for the EC2 API Tools the tutorial is based on though, which indeed require the use X.509 certificates due to being (mostly) based on the older EC2 SOAP API still.Update: The EC2 API Tools meanwhile support AWS access keys as well and deprecated using X.509 certificates accordingly:
Alternative
You might want to check out an alternative first though: If you are comfortable in Python, I'd highly recommend the excellent boto (An integrated interface to current and future infrastructural services offered by Amazon Web Services), which works just fine with access keys, offers almost the same feature set as the EC2 API tools (plus most other AWS APIs) and performs significantly faster due to targeting the newer AWS REST APIs only.
Solution
AWS Identity and Access Management (IAM) does not support accessing the actual AWS account, it only covers the AWS Management Console, and most AWS APIs of course. You'll need to sign in with the AWS account's login and password (i.e. those of the account owner) to access the Security Credentials page.
This is not recommended anymore though (see section Security Credentials within IAM Concepts):
However, you can still achieve your goal by using your own certificate as outlined further down in section X.509 Certificates:
How to actually do the latter is illustrated in Uploading a Signing Certificate.