【问题标题】:How to create a role with specified arn with cloudformation in aws?如何在aws中使用cloudformation创建具有指定arn的角色?
【发布时间】:2025-12-08 17:55:01
【问题描述】:

我想在 aws 中通过 cloudformation 创建一个具有指定 arn 的角色。但我不知道该怎么做。因为我们无法在模板文件中为角色指定名称。

【问题讨论】:

    标签: amazon-cloudformation


    【解决方案1】:

    假设您指的是 IAM 角色,使用 CloudFormation 是不可能的。 CloudFormation 将根据堆栈名称和逻辑资源 ID 自动为您的角色生成一个名称。例如,arn:aws:iam::112233445566:role/myStackName-myRoleName-XXXXXXXXXXXXX

    【讨论】:

      最近更新 更多