【发布时间】:2020-11-04 14:44:28
【问题描述】:
我是 aws cloudformation 模板的新手,我只想将以下角色限制为 SQS 服务。 请建议我如何使用条件来实现相同的目标。
我的模板示例::
AWSTemplateFormatVersion: 2010-09-09
Description: >-
This template creates Role
Parameters:
vpcname:
Type: String
Description: Enter vpcname
Resources:
ErrorQueueRole:
Type: 'AWS::IAM::Role'
Properties:
RoleName: !Join ["",[ErrorQueueRole.,!Ref vpcname]]
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- sqs.amazonaws.com
Action:
- sts:AssumeRole
Condition:
StringEquals:
【问题讨论】:
-
你能解释一下你想要达到的目标吗?
标签: amazon-web-services yaml amazon-cloudformation amazon-iam amazon-sqs