哪个用户启动了 EC2 实例?

2024-01-02

我有一些 EC2 实例,我真的不知道是谁启动了它们。

有没有办法知道谁启动了特定实例?


不幸的是,此信息无法通过 API 调用直接获得 - 您当前有两个选择:

  1. depending on your needs, you could approximate your goal by using the DescribeInstances http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html API action to look at the key-name used for starting that instance (if any, it's optional, though usually in place) - assuming you have followed security best practices and are using a dedicated EC2 key pair per IAM https://aws.amazon.com/iam/ user (rather than sharing keys), the key should usually denote the user who started the instance ;)
    • 这是最容易通过测试AWS 命令​​行界面 https://aws.amazon.com/cli/, 具体来说描述实例 http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
  2. 现在你可以激活AWS 云跟踪 https://aws.amazon.com/cloudtrail/, which 记录您账户的 AWS API 调用并向您提供日志文件 and 准确提供您想要的信息:

记录的信息包括API调用者的身份、 API调用的时间、API调用者的源IP地址、 请求参数以及AWS返回的响应元素 服务。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

哪个用户启动了 EC2 实例? 的相关文章

随机推荐