官术网_书友最值得收藏!

  • AWS Administration Cookbook
  • Lucas Chan Rowan Udell
  • 222字
  • 2021-07-09 18:18:28

Permissions and service roles

One important thing to remember about CloudFormation is that it's more or less just making API calls on your behalf. This means that CloudFormation will assume the very same permissions or role you use to execute your template. If you don't have permission to create a new hosted zone in Route 53, for example, any template you try to run that contains a new Route 53-hosted zone will fail.

On the flip side, this has created a somewhat tricky situation where anyone developing CloudFormation typically has a very elevated level of privileges, and these privileges are somewhat unnecessarily granted to CloudFormation each time a template is executed.

If my CloudFormation template contains only one resource, which is a Route 53-hosted zone, it doesn't make sense for that template to be executed with full admin privileges to my AWS account. It makes much more sense to give CloudFormation a very slim set of permissions to execute the template with, thus limiting the blast radius if a bad template were to be executed (that is, a bad copy-and-paste operation resulting in deleted resources).

Thankfully, service roles have recently been introduced, and you can now define an IAM role and tell CloudFormation to use this role when your stack is being executed, giving you a much safer space to play in.

主站蜘蛛池模板: 巴马| 林州市| 沭阳县| 星座| 锡林郭勒盟| 平原县| 昌都县| 沾益县| 桑日县| 施甸县| 永昌县| 遂平县| 临沂市| 内乡县| 汤阴县| 彩票| 温宿县| 宝清县| 内丘县| 成安县| 大关县| 明光市| 离岛区| 芦山县| 商城县| 武功县| 肇源县| 德昌县| 甘南县| 新化县| 棋牌| 徐州市| 嘉黎县| 历史| 瑞昌市| 平乐县| 麦盖提县| 隆安县| 平和县| 德保县| 墨玉县|