upjohnc / aws-fargate-with-step-functions

Patterns for running Amazon ECS/AWS Fargate tasks resiliently with AWS Step Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS Fargate with Step Functions

Patterns for resilient AWS Fargate task execution with AWS Step Functions.

1. Resilient Scheduled Fargate Tasks

This example shows you how to make scheduled Fargate tasks resilient by using the Step Functions' "Retry" feature.

resilient-scheduled-fargate-tasks

2. Parallerized Fargate Tasks

This example shows you how to run parameterized and parallerized Fargate tasks by using the Step Functions' "Map" state.

parallelized-fargate-tasks

3. Granular Error Handling based on Fargate Task's "stoppedReason"s

This example shows you how to handle errors based on the "stoppedReason" field of ECS task result.

You can do "Retry when the error is ResourceInitializationError, but do not retry and just fail when the error is CannotPullContainerError", for example. See the full list of the error codes in the Amazon ECS documentation.

stoppedreason-based-error-handling

Contribution

  1. Fork (https://github.com/toricls/aws-fargate-with-step-functions/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the main branch
  5. Create a new Pull Request

Licence

MIT

Author

Tori Hara

About

Patterns for running Amazon ECS/AWS Fargate tasks resiliently with AWS Step Functions

License:MIT License