我正在使用 AWS 的 CloudForm,最近我花了相当多的时间试图弄清楚为什么我创建的角色和附加的策略不允许我的 ECS 任务向简单队列服务(Simple Queue Service,SQS)队列发送消息。
I realized that I was incorrectly attaching the SQS permissions policy to the Execution Role
when I should have been attaching the policy to the Task Role
. I cannot find good documentation that explains the difference between the two roles. CloudFormation documentation for the two of them are here: 执行角色 and 任务角色