Step function integration with internal API using http task

0

Hello, Step functions now provides direct integration with 3rd party APIs instead of using lambdas for API invocation. I was able to integrate external API with Step function by following this article. https://docs.aws.amazon.com/step-functions/latest/dg/connect-third-party-apis.html.

But this is failing if integrated with internal API with an error like 'Unable to resolve domain 'internal api url here' to IpV4 address.

Does this mean internal APIs that are not publicly exposed can't be used? I wouldn't want to make this API public just to get the integration working or to set up an API gateway. Is there any other way than using lambda?

Thank you!

veera
asked 22 days ago74 views
3 Answers
0
Accepted Answer

You are correct. HTTP tasks do not support private endpoints. To call thise endpoints, you will need to use a Lambda function that you attache to the VPC and let it make the call.

profile pictureAWS
EXPERT
Uri
answered 21 days ago
0

You can also use API Gateway with Private Integration

answered 6 days ago
  • API Gateway with private integration wouldn't work as the Step function will not be able to resolve the DNS.

  • Actually, this is another option. API Gateway has private or public endpoints, and also, public or private integrations (using VPC link). In this case the recommendation is to use an API Gateway with a Public endpoint, which can be accessed from EventBridge, and a private integration, using VPC Link, to the internal API.

  • Creating a public endpoint would no longer mean it is a private and defeats the whole purpose. I implemented this with lambda function attached to the VPC and invoking the private API from that.

0

API Gateway with private integration wouldn't work as the Step function will not be able to resolve the DNS.

veera
answered 6 days ago
  • You could block external access to the API with a policy or IAM authentication. It works and it should have a lower latency, but a Lambda function is easier. And if you use Step Functions, probably latency is not a concern

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