简体   繁体   English

以编程方式启动使用 AWS-Console VS 创建的配置

[英]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方法一

  1. Revoke permissions to launch configuration from all users with the console access.从具有控制台访问权限的所有用户撤消启动配置的权限。
  2. Use separate user for the program, who has permission to launch configuration.为程序使用单独的用户,该用户有权启动配置。

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.

相关问题 AWS-Console:对嵌套字段进行 DynamoDB 扫描 - AWS-Console: DynamoDB scan on nested field 浏览器中的AWS控制台与Java的AmazonSDK之间的文件上传时间差异很大 - Big difference in time of uploading file between AWS-console in browser and AmazonSDK for java 通过 aws-sdk javascript 或来自 aws-console 的 AWS S3 存储桶存储量限制(以 GB 为单位) - AWS S3 bucket storage volume limit (in GB) through aws-sdk javascript or from aws-console AWS Beanstalk 在控制台显示中缺少配置 - AWS Beanstalk missing configurations in console display 有没有办法列出通过aws-cli按CreatedTime排序的启动配置? - Is there a way to list launch configurations sorted by CreatedTime via aws-cli? 使AWS用户数据在多个启动配置之间保持同步 - Keeping AWS user data in sync across multiple Launch Configurations aws 启动模板与启动配置有什么不同? - what is different between aws launch template vs launch configuration? 以编程方式更改新创建的AWS实例的主机名 - Programmatically change hostname of a newly created AWS instance 如何以编程方式创建启用了AWS控制台的用户 - How to create programmatically an AWS Console enabled user AWS Cognito UserPool RecoveryOptions - CloudFormation 与控制台 - AWS Cognito UserPool RecoveryOptions - CloudFormation vs Console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM