[英]Launch Configurations Created using AWS-Console VS Programmatically
I would like to find out if there is an easy way to find out whether given launch configuration is created using AWS Console or Programmatically?我想知道是否有一种简单的方法来确定给定的启动配置是使用 AWS 控制台还是以编程方式创建的?
Usecase:用例:
We are planning to avoid copying/creating launch configuration using AWS-Console, so we would like to implement some alert system if there is any launch configuration created using AWS-Console.我们计划避免使用 AWS-Console 复制/创建启动配置,因此如果有任何使用 AWS-Console 创建的启动配置,我们希望实施一些警报系统。
So is there any way we can look at a flag on the launch configuration and differentiate if the launch configuration is created using AWS Console or not?那么有什么方法可以查看启动配置上的标志并区分启动配置是否是使用 AWS 控制台创建的?
Quick thought快速思考
Approach 1方法一
Approach 2方法二
Write a program which is monitoring CloutTrail logs.编写一个监控 CloutTrail 日志的程序。 because all the things we do whether via console or API are/can_be logged in CloudTrail因为我们所做的所有事情无论是通过控制台还是 API 都/可以_记录在 CloudTrail 中
My suggestion would be: Use only CloudFormation to create the LaunchConfigs and then check for the existence of relevant CF-tags.我的建议是:仅使用 CloudFormation 来创建 LaunchConfig,然后检查相关 CF 标签的存在。
Added bonus: you can create a specific role for CF to launch EC2 instances and then revoke all permissions for your users.额外奖励:您可以为 CF 创建一个特定角色来启动 EC2 实例,然后撤销您用户的所有权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.