Invalid ARN Prefix, when using Execution ID in GetExecutionHistory

0

I'm trying to use the context object Execution ID as described here:

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

So I can call the getExecutionHistory API as a task in my step function so I can keep track of how many events happen and not go over the 25,000 threshold. However when I pass the $$.Execution.Id as a parameter to the API I get an Invalid ARN Prefix error.

What should I be doing differently? Can you not use the API to get a running Step Function's State Machine Event History?

asked a month ago93 views
1 Answer
0

When calling APIs from tasks, you need to pass the execution ARN instead of the execution ID. You can access the execution ARN from the context object like this: "Parameters": { "ExecutionArn": "$$.Execution.Arn" }

AWS
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions