-
Notifications
You must be signed in to change notification settings - Fork 0
/
step_function_workflow_updater.cform
54 lines (53 loc) · 1.65 KB
/
step_function_workflow_updater.cform
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
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters" : {
"S3Key" : {
"Type" : "String",
"Description" : "The S3 Key to the workflow JSON for the state machine definition"
},
"SMResource" : {
"Type" : "String",
"Description" : "The identifier of the StateMachine resource whose workflow will be updated",
"Default" : "MyStateMachine"
}
},
"Transform" : [ "StepFunctionWorkflowInjector" ],
"Resources" : {
"MyStateMachine" : {
"Type": "AWS::StepFunctions::StateMachine",
"Properties": {
"DefinitionString": "{\"StartAt\":\"HelloWorld\",\"States\":{\"HelloWorld\":{\"End\":true,\"Result\":\"Hello World!\",\"Type\":\"Pass\"}}}",
"RoleArn": { "Fn::GetAtt" : [ "MyStateMachineRole", "Arn" ] }
}
},
"MyStateMachineRole" : {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
},
"Path": "/",
"Policies": [ ]
}
}
},
"Outputs" : {
"StateMachineArn" : {
"Description" : "The Arn of the StateMachine that has been created",
"Value" : { "Ref" : "MyStateMachine" }
},
"RoleArn" : {
"Description" : "The Arn of the Role that the StateMachine will be using, allows policies to be added later",
"Value" : { "Fn::GetAtt" : [ "MyStateMachineRole", "Arn" ] }
}
}
}