Skip to content

Instantly share code, notes, and snippets.

@theburningmonk
Last active July 31, 2019 20:27
Show Gist options
  • Save theburningmonk/de87c55aec0974751d5b05a7fbdb1644 to your computer and use it in GitHub Desktop.
Save theburningmonk/de87c55aec0974751d5b05a7fbdb1644 to your computer and use it in GitHub Desktop.
functions:
hello-world:
handler: hello-world.handler
stepFunctions:
stateMachines:
myStateMachine:
definition:
StartAt: firstTask
States:
firstTask:
Type: Task
Resource:
Fn::GetAtt: [hello-world, Arn]
Next: secondTask
secondTask:
Type: Task
Resource: arn:aws:states:::lambda:invoke
Parameters:
FunctionName:
# you can use Ref to get the function name
Ref: hello-world
Payload:
answer: 42
Next: thirdTask
thirdTask:
Type: Task
Resource: arn:aws:states:::lambda:invoke.waitForTaskToken
Parameters:
FunctionName:
# you can also use Fn::GetAtt to get the ARN
Fn::GetAtt: [hello-world, Arn]
Payload:
token.$: $$.Task.Token
End: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment