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
posta un mese fa101 visualizzazioni
3 Risposte
0
Risposta accettata

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
ESPERTO
Uri
con risposta un mese fa
0

You can also use API Gateway with Private Integration

con risposta 25 giorni fa
  • 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
con risposta 25 giorni fa
  • 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

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande