By using AWS re:Post, you agree to the Terms of Use
/Step functions pass input into Fargate instance :/

Step functions pass input into Fargate instance :


by looking at this AWS document:

step functions can totally instantiate/manage fargate or ECS Task. Speaking about fargate

  • the example put fargate as first step. suppose fargate is the 2nd step, can we get the output message from first step (larger than 8K) into fargate task through either .sync or .waitForTaskToken model? Instead of passing input parameters through fargate containerOverride's command or commands?
  • If above is possible, does the code inside fargate suppose to do something like : GetActivityTaskResult getActivityTaskResult = client.getActivityTask(new GetActivityTaskRequest().withActivityArn(stringActivityArn));

       String taskToken = getActivityTaskResult.getTaskToken();
       String taskInput = getActivityTaskResult.getInput();
  • In this step function instantiate fargate model (.sync or .waitForTaskToken), does fargate instances gets created each time when step functions "calls" it? That is, we actually would like to set desire_count and min count both to zero and forget about scaling alarms or metrics. If above is true, does it respect the max_count? I guess cost-wise, it is fine with us because how many concurrent fargate running does not matter anymore. Cost is based on usage.

  • is ECS or fargate able to return output values to the calling step function? that is, using sendSucess or some other api to send output back to step function for next step to use (become the input of next step)?
1 Answers

from this re:POST :

it seems like the only way to pass values into fargate is through command line or environment variable? since we can use json path, if the message is very large, then pass

$Input through command line or environment counted as 6 bytes or the actually message size?

When calling AWSStepFunctionsClient.sendTaskSucess(SendTaskSuccessRequest request). does the message have size limit?

answered 3 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