1 Answer
- Newest
- Most votes
- Most comments
3
To pass data from Step Functions to an ECS, you have two options:
- Override the
commandfor the container; or - Override the
environmentfor the container (i.e., declare environment variables)
The values can be referenced from the state's input by referring to paths in it.
Some examples are provided in the Step Functions integration documentation.
To pass data from your container back to Step Functions, you need to invoke the ECS Task asynchronously (using .waitForTaskToken instead of .sync) and pass $$.Task.Token to your container, for example, via a TASK_TOKEN environment variable. After your container has finished processing, and before your container exits, it must call SendTaskSuccess with the task token and whatever output object you wish to send. This callback pattern is discussed in the documentation here.
Relevant content
asked 2 years ago
asked 2 years ago
