Integration of Private APIs with AWS Step function Tasks

0

We have Private APIs with API-G endpoints backed by a Lamba within a VPC and Subnet.

We also have a step function that relies on these API endpoints

What policies should we add to allow step function invoke Private APIs ? This is the error I see during step function executions -

{
  "resourceType": "apigateway",
  "resource": "invoke",
  "error": "ApiGateway.UnknownHostException",
  "cause": "[API-G].execute-api.us-west-2.amazonaws.com: Name or service not known"
}

VPC already has 443 inbound rule added to its security group. Do we need to create VPC Private link between step function and VPC ?

The integration works fine for regional public APIs. But as soon as we convert these to private, the integration fails with above error.

Note that, I am still able to invoke the APIs from the API-G console and step function execution role has permissions to invoke the APIs.

2개 답변
1

Hi Ankula ,

AWS StepFunctions cannot invoke Private API's . please refer the below documentation. https://docs.aws.amazon.com/step-functions/latest/dg/connect-api-gateway.html

답변함 8달 전
profile picture
전문가
검토됨 8달 전
  • We want to perform multiple operations via Internal Coral Lambda Endpoint (CLE) framework that allows us to expose multiple APIs and use single lambda.

    We can do this with separate lambda as well and handle individual step function tasks. But we choose to use CLE framework. Though we were unaware of this step function limitation of not being able to access private APIs.

1

Step Functions can't invoke directly resources within your VPC, such as Private APIs. You can invoke a Lambda function that you attach to the VPC that calls the API. Another option for you might be to bypass the API Gateway and go directly from StepFunctions to the backend Lambda (if it makes sense).

profile pictureAWS
전문가
Uri
답변함 8달 전
  • We want to perform multiple operations via Internal Coral Lambda Endpoint (CLE) framework that allows us to expose multiple APIs and use single lambda.

    We can do this with separate lambda as well and handle individual step function tasks. But we choose to use CLE framework. Though we were unaware of this step function limitation of not being able to access private APIs.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠