1 Answer
- Newest
- Most votes
- Most comments
3
To pass data from Step Functions to an ECS, you have two options:
- Override the
command
for the container; or - Override the
environment
for 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
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago