Passing data between two ecs tasks using step functions

0

There are two fargate tasks that runs on scheduled time . I want to pass the output of one ecs task as an input to another using step functions. But I am getting stucked here . The problem I am facing is with the key used in both the tasks which need to be same as the key used in state machine defination in ResultPath / OutputPath. Lets say I am passing a list in first task output like return ( "news_items": news_items } The ResultPath I am using is $.news_items But in the second task it is not receiving the correct input Please help me with this issue

2 Answers
0
profile picture
answered 4 months ago
0

I believe you need first to check the size of the data that needs to be sent. If the data is small (I believe the threshold is 256K), you can send the data within the step function. However, if the data is more than that, you will need to use middleware (as suggested by the answer above). In other words, in the latter case, you need to make the first task write the data as output to s3 and the next task reads the data as input from the same s3.

Ahmed
answered 4 months 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