Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a lambda in an AWS Step Function know the "execution name" of the step function that launched it?

I have this step function that can sometimes fail and I'd like to record this in a (dynamo) DB. What would be handy is if I could just create a new error handling step and that guy would just pick up the "execution name" from somewhere (didn't find it in the context) and record this as a failure.

Is that possible?

like image 484
Gurg Hackpof Avatar asked Feb 18 '18 17:02

Gurg Hackpof


1 Answers

AWS Step Functions released recently a feature called context object.

Using $$ notation inside the Parameters block you can access information regarding your execution, including execution name, arn, state machine name, arn and others.

https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html

like image 108
diegosantiviago Avatar answered Oct 24 '22 10:10

diegosantiviago