In this video, you will learn how to integrate SnapLogic with Amazon API Gateway.
SnapLogic-Amazon API Gateway Integration
Hi! In this video I will demonstrate how to integrate SnapLogic Enterprise Integration Cloud with Amazon API Gateway.
First, you will need to create a project in SnapLogic with triggered or Ultra tasks.
In this demo, I have created a pipeline and a triggered task that is ready to be converted into an OpenAPI specification also known as a Swagger.
Within the project’s context menu on the SnapLogic Manager, I will select the Open API option in my Amazon API Management project located on the left hand side.
Once the OpenAPI option is selected, SnapLogic will create a YAML-based Swagger specification and it is then download automatically.
In order to make this YAML file compatible for use in the Amazon API Gateway, you need to remove the securityDefinitions section in the YAML file. The Amazon API Gateway does not currently support basic-authentication.
Once you delete the security specification, you should add a brief description for this Swagger specification. In this example, I will name it “AWS –DASH – APIGateway – DASH – TEST.”
After the Swagger specification is created, we can continue the integration on the Amazon API Gateway platform.
We can start importing the Swagger specification and select the YAML file by clicking on the “Create API” button.
Once the import is complete, you should be able to see the complete YAML file.
As part of the one-time exercise, we will need to set up the method execution exposed by the API.
In the set-up window, select HTTP for the Integration Type and make sure you check the “HTTP Proxy Integration” box.
And then specify the SnapLogic task URL. You can go back to the SnapLogic and view the SnapLogic task URL under details and do simple copy and paste.
Save the set-up once you have inputted all the information needed.
Now, let’s drill down into Method request and define URL query parameters and HTTP request handlers.
Once we are done, we are ready to test this API.
We need to add the value for the pipeline parameters and the bearer token associated with the task
And then click on test
Now on the right side, we received a HTTP 200 response code, which indicates a successful invocation of the API. If you need to invoke the API Gateway from a browser, you will need to update the CORS preference by opening the “Actions” drop down menu and selecting “Enable CORS”.
Provide the necessary policies to update the CORs preferences.
Now we are ready to deploy this API in the Amazon API Gateway by opening the “Actions” menu again and click on “Deploy API.”
A window will pop up and you will need to provide information such as Deployment Stage, a stage name and brief descriptions for the stage and deployment. And click on “Deploy”
Once the proxy is successfully deployed, you can use the Stage Editor to input Gateway specific information, such as API caching, API throttling settings
Then let’s drill down into the API and go into the Method screen to obtain the Invoke URL. You can call the Amazon API Gateway directly from the browser or any REST client with this Invoke URL.
In this demo, I will call the API Gateway from a browser. I will also have to add query parameter values along with the Bearer token.
Once we tap the return key, we obtain a successful response from the Amazon API Gateway.
Thank you for watching this video. Visit docs-snaplogic.atlassian.net to learn about more new features.