StepFunctions: Retrieve distributed map execution arn in fallback state

0

We have a distributed map that collects information from an external service. It happens from time to time that the external service needs manual intervention to continue providing data. We would like to stop execution of the distributed map and wait for the manual intervention in that case, without starting new batches in the distributed map (no need to stop batches that are already running, though). We can stop the map from spawning new functions by throwing an error, and we can collect the relevant information via a ResultsWriter. But to retrieve the information of the ResultsWriter, we need the arn of the distributed map run. How can we retrieve this arn in the fallback state that happens on catch?

Daniel
preguntada hace 9 meses300 visualizaciones
2 Respuestas
1

To specify your own Map Run ARN, complete the following in Workflow studio:

  1. Click on the map
  2. Ensure that you are on the Configuration tab and scroll down to the Runtime settings section
  3. Expand Additional Configuration
  4. Check the box "Use state name as label in Map Run ARN " and specify your own ExampleMapLabel.

To learn more, click on the "Info" link. This seems to provide the ARN that you need. There is also an example at the end of the documentation.

Hope this helps, if it does please accept this answer and give it a thumbs up

profile picture
respondido hace 9 meses
  • Thanks! This allows to add more information to the Map Run ARN, but it doesn't allow me to retrieve the Map Run ARN in the following step.

0
Respuesta aceptada

You can use the ListMapRuns Action (https://docs.aws.amazon.com/step-functions/latest/apireference/API_ListMapRuns.html) which will give you a list of map runs that were started by the given state machine execution. You can then retrieve the ARN from this list.

AWS
INGENIERO DE SOPORTE
Thabo_M
respondido hace 9 meses
  • Thanks! It's a bit hacky, but I think it would work.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas