EC2 的标签实施 - AWS [英] Tag Enforcement for EC2 - AWS

查看:47
本文介绍了EC2 的标签实施 - AWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 EC2 强制执行标签.意味着,没有特定标签,它不应该允许启动 EC2 实例.我有 IAM 政策的解决方案,但我不希望 IAM 政策有此解决方案.

I wanted to enforce tags for EC2. Means, without certain tags, it shouldn't allow to launch EC2 instance. I have a solution with IAM Policy, but I don't want this to be with IAM Policy.

正在寻找其他方式来强制执行标签.请指教.

Looking for some other way to enforce tags. Please advice.

谢谢

推荐答案

我的帐户是AWS 组织的一部分,那么您很幸运.AWS 发布了一项名为 标签策略,专门强制组织单位中的 EC2 实例需要某些标签.

I your account is part of an AWS organisation then you're in luck. AWS released a feature called tag-policies that specifically forces EC2 instances in an organisational unit to require certain tags.

但是,如果您的账户是独立的(不是 AWS 组织的一部分),那么 IAM 将是控制用户访问的主要工具,因此如果在此处设置权限,则始终允许使用.

However if your account is standalone (not part of an AWS organisation) then IAM will be the primary tool for controlling user access, so if a permission is set here then it will always be allowed.

如果您在使用 AWS Config 的独立账户中,还有另一个选项可以删除这些实例.

There is another options to remove these instances if you are in a stand alone account using AWS Config.

AWS Config 有一个管理规则 required-tags.假设未设置所需规则,则可以调用 Lambda 来终止相关实例.

AWS Config has a managed rule of required-tags. Assuming a required rule is not set then a Lambda can be invoked to terminate the instance in question.

这篇关于EC2 的标签实施 - AWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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