Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call external API from AWS Step Function?

I want to implement a simple sequence of tasks on AWS Step Function. Something like next: Step Function Diagram

  • I can't fire and forget External API, because I need a response from it. So it is a bad idea to wrap it in a lambda function.
  • I can't implement the External API task on Lambda Function, because work exceeds lambda limitations.

The best way that I see is the implementation of a call to External API from the task of Step Function. If I understand correctly it is possible to do with Activities and Worker.

I see some Ruby example, but it isn't clear for me. Could anybody suggest me a good tutorial with clear examples of similar implementation?

PS: External API I could wrap in anything on EC2.

like image 313
RredCat Avatar asked Jul 27 '26 20:07

RredCat


1 Answers

Unfortunately you can't call an external API from the Step Function. You have to wrap the call in a Lambda.

AWS documentation:

Step Functions supports the ability to call HTTP endpoints through API Gateway, but does not currently support the ability to call generic HTTP endpoints.

like image 126
forzagreen Avatar answered Jul 29 '26 12:07

forzagreen