user3301494
user3301494

Reputation: 11

Is there a way to access the Step Function state name inside AWS Lambda function

I have a Step Functions statemachine that runs two parallel states. First state calls a Lambda function and second state posts to SNS topic. In case of errors in any of the states, I call a Lambda function to capture the error and notify the team via email.

The challenge here is to get the Name of the State from which the Lambda function has been invoked.

I tried using context object, but that didn't help. Please advise.

Upvotes: 1

Views: 1996

Answers (1)

Robert Kossendey
Robert Kossendey

Reputation: 6998

Step Functions has a context object, which you can send to the execution arn of your Lambda.

See: Context Object - AWS Step Functions

Upvotes: 3

Related Questions