-
Notifications
You must be signed in to change notification settings - Fork 14
/
definition.yml
54 lines (54 loc) · 1.57 KB
/
definition.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
description: Consumes Process Catalogs from queue and invokes workflow
environment:
CIRRUS_BASE_WORKFLOW_ARN: "arn:aws:states:#{AWS::Region}:#{AWS::AccountId}:stateMachine:#{AWS::StackName}-"
CIRRUS_PROCESS_QUEUE: !Ref ProcessQueue
lambda:
memorySize: 128
timeout: 900
handler: lambda_function.lambda_handler
events:
- sqs:
arn: !GetAtt ProcessQueue.Arn
iamRoleStatements:
- Effect: "Allow"
Action:
- states:StartExecution
Resource: arn:aws:states:#{AWS::Region}:#{AWS::AccountId}:stateMachine:#{AWS::StackName}-*
- Effect: "Allow"
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:BatchGetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DescribeTable
Resource:
- !GetAtt StateTable.Arn
- !Join ['', [!GetAtt StateTable.Arn, '/index/*']]
- Effect: "Allow"
Action:
- sqs:GetQueueUrl
- sqs:ReceiveMessage
- sqs:DeleteMessage
Resource:
- !GetAtt ProcessQueue.Arn
- Effect: "Allow"
Action:
- "s3:ListBucket"
- "s3:GetObject"
- "s3:GetBucketLocation"
Resource: "*"
- Effect: "Allow"
Action:
- "s3:PutObject"
Resource:
- !Join
- ''
- - 'arn:aws:s3:::'
- ${self:provider.environment.CIRRUS_PAYLOAD_BUCKET}
- '*'
- Effect: "Allow"
Action: secretsmanager:GetSecretValue
Resource:
- arn:aws:secretsmanager:#{AWS::Region}:#{AWS::AccountId}:secret:cirrus-creds-*