Created
June 6, 2018 18:22
-
-
Save nathanpeck/209c6ed955dd865a91c9675df1c78468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A role for the service so it can access the tables | |
ChatServiceRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: "ecs-tasks.amazonaws.com" | |
Action: ['sts:AssumeRole'] | |
Path: / | |
Policies: | |
- PolicyName: users-dynamodb-table | |
PolicyDocument: | |
Statement: | |
- Effect: Allow | |
Action: | |
- "dynamodb:PutItem" | |
- "dynamodb:GetItem" | |
- "dynamodb:Query" | |
- "dynamodb:Scan" | |
- "dynamodb:UpdateItem" | |
- "dynamodb:DeleteItem" | |
Resource: | |
- !Join ['', ['arn:aws:dynamodb:*:*:table/', !Ref 'UsersTable']] | |
- !Join ['', ['arn:aws:dynamodb:*:*:table/', !Ref 'MessagesTable']] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment