-
Notifications
You must be signed in to change notification settings - Fork 14
/
definition.yml
50 lines (50 loc) · 1.4 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
description: update the cirrus database with the execution state
lambda:
memorySize: 128
timeout: 15
handler: lambda_function.lambda_handler
events:
- eventBridge:
pattern:
source:
- aws.states
detail-type:
- Step Functions Execution Status Change
detail:
stateMachineArn:
- prefix: "arn:aws:states:#{AWS::Region}:#{AWS::AccountId}:stateMachine:#{AWS::StackName}-"
status:
- SUCCEEDED
- FAILED
- ABORTED
- TIMED_OUT
iamRoleStatements:
- Effect: "Allow"
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DescribeTable
Resource:
- !GetAtt StateTable.Arn
- !Join ['', [!GetAtt StateTable.Arn, '/index/*']]
- Effect: Allow
Action:
- states:GetExecutionHistory
Resource:
- arn:aws:states:#{AWS::Region}:#{AWS::AccountId}:execution:#{AWS::StackName}-*
- Effect: "Allow"
Action:
- SNS:Publish
Resource: arn:aws:sns:#{AWS::Region}:#{AWS::AccountId}:*
- Effect: "Allow"
Action:
- s3:GetObject
Resource:
- !Join
- ''
- - 'arn:aws:s3:::'
- ${self:provider.environment.CIRRUS_PAYLOAD_BUCKET}
- '*'