AWS IAM Policies from AWS SAM

ECS Compose-X has defined some IAM permissions for each resource types. In order to provide developers with greater flexibility and use well known system, Compose-X also imports IAM definitions from AWS Serverless Application Model.

You can find all the policies define in AWS SAM in AWS Documentation pages .

Example

ECS Compose-X Policy for SQS
services:
  QueueConsumer: {} # Service definition

x-sqs:
  QueueA:
    Services:
      - name: QueueConsumer
        access: RWMessages
Using AWS SAM Policy
services:
  QueueConsumer: {} # Service definition

x-sqs:
  QueueA:
    Services:
      - name: QueueConsumer
        access: SQSPollerPolicy

In the example above, we are using the SQSPollerPolicy which is already defined for us by AWS SAM.