cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping an Ultra Task to AWS API Gateway

Schevus
New Contributor III

Has anyone successfully mapped a pipeline exposed via an Ultra Task to an AWS API Gateway API? I feel like I’m doing everything right, but I’m getting an inexplicable 500 error. Wondering if anyone has had success with this that might be able to offer any tips?

6 REPLIES 6

sriram
Former Employee

You can integrate with the Amazon API Gateway using SnapLogic’s built-in capability to generate Open API specs. Here’s the set of steps to perform this task:

Step 1: In the usual manner, once you have a pipeline developed that conforms to the Ultra Pipeline Standards, an Ultra task can be created in SnapLogic

Step 2: Following this, you can generate an Open API spec from within SnapLogic that documents the Ultra task. Ensure that the method type is POST and not GET based on the pipeline’s design

Step 3: Now, on the Amazon API Gateway side, you can create an API from this Swagger spec

Step 4: Next, on the API setup page,

  • Select HTTP as value for Integration type
  • Check Use HTTP Proxy integration
  • Select POST as the HTTP method
  • Set SnapLogic Ultra task URL for Endpoint URL

Note: The Snaplex that is being used to run the Ultra pipeline would need to be configured to use an Ultra Load Balancer if you intend to invoke it from outside of SnapLogic

Step 5: On the Method Execution > Method Request page, define URL Query String Parameters (if any) and HTTP Request Header (to pass the SnapLogic Bearer token. key for this header is: Authorization)

Step 6: At this point, the API can be deployed and a Gateway URL will be generated

Step 7: To interact with the SnapLogic Ultra pipeline, the Gateway URL can be used to make POST requests.

Sample invocation using the Gateway URL:

https://my-gateway-URL.amazonaws.com/Stage_Name/SnapLogic_Ultra_Task_From_Swagger?bearer_token=<>

Schevus
New Contributor III

Thanks Sriram. I’ve followed these directions, but we’re still getting a 500 error. On the test page, it says: Execution failed due to configuration error: Invalid endpoint address. Will be following up with our AWS SMEs for deeper logging insights into the problem. I’m certain I’m using the correct endpoint address.

Rudradip
New Contributor II

I am also facing same issue . Any update ? Have you solved it ?

Schevus
New Contributor III

Yes, we did solve it. The problem was that API Gateway resides in the public VPC portion of our AWS account, but the SnapLogic call was happening over our private direct connect tunnel into our local environment. We were able to solve the problem by enabling the endpoints as VPC link resources, and setting up a network load balancer that points to the internal SnapLogic URL.