10-11-2018 08:46 AM
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?
10-11-2018 03:23 PM
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,
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=<>
10-12-2018 09:04 AM
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.
01-28-2019 11:36 PM
I am also facing same issue . Any update ? Have you solved it ?
01-29-2019 04:57 AM
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.