如何在CloudFormation中生成AWS根账户ARN? [英] How to generate the AWS root account ARN in CloudFormation?

查看:72
本文介绍了如何在CloudFormation中生成AWS根账户ARN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况

我正在CloudFormation中生成KMS密钥。根据 KMS政策文档,它至关重要创建一个策略,其中 Principal 是帐户本身,以便IAM策略能够授予对密钥的访问权限。

I am generating a KMS Key in CloudFormation. According to the KMS policy documentation, it is crucial to create a policy where the Principal is the account itself, in order for IAM policies to be able to grant access to the key.

问题

如何为CloudFormation中的帐户根目录创建ARN?

How can I create the ARN for the account root in CloudFormation?

推荐答案

对于使用YAML作为CloudFormation模板的用户:

For those who use YAML for their CloudFormation templates:

!Sub arn:aws:iam::${AWS::AccountId}:root

这篇关于如何在CloudFormation中生成AWS根账户ARN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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