How to integrate with Amazon API gateway?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to integrate with Amazon API gateway?
I have swagger api and i want to use amazon api gateway to secure it? Where do I start?
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is what I have done so far.
I could import my api definition which is at https://swaggerhub.com/api/sandy007/ffnodeapi/1.0.0
And then I went to Manage Integrations => selected Amazon API Gateway
But I am not sure which all details should I be entering
I have entered my AWS Access Key and AWS Secret Key but still cant see this api in my AWS console.
I am very helpless at the moment as this needs to be met on immediate basis.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Still waiting for the Backend guys to come online... they're in Pacific Time, so it'll still be a little bit longer.
I recall the need to set the basePath, have you tried that?
basePath = prepend ( inside the Integration modal for Amazon Gateway )
If you're still stuck, you can always import the API from within Gateway... https://www.youtube.com/watch?v=2LT5mHqKL7g
Your spec's path would be.. https://api.swaggerhub.com/apis/sandy007/ffnodeapi/1.0.0
Hopefully the cavalry will be here soon 😉
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, you'll need to add all the values in the form, they are really specific to AWS. Specifically:
* AWS Region. Note you need to choose a region which supports AWS Gateway, such as US-WEST-2 or US-EAST-1.
* API ID can be left blank
* Publish mode. This means, if your API already exists, you can "merge" changes or overwrite. We suggest always using "overwrite".
* Deployment mode. This lets you "push on save" or disable the integration altogether. Sometimes you don't want to push every single time, so choosing "never" will prepare your definition to be saved, but not actually save it on AWS
* Execution role. This tells SwaggerHub how to create lambda functions. Please read the permissions model for Lambda in the Amazon docs. It is suggested that you create a role in the EC2 console first by choosing "Account / Security Credentials", then "Roles". Create a new role with a trust policy like this:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
After creating the role, you'll see something called a "Role ARN" which is in the format of
Tony Tam
SmartBear VP of Swagger Products
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @fehguy ,
I created role on EC2 but I can't see SwaggerHub "Execution role" to enter. Other than that I have followed everything.
I have kept Base path Mode as blank and Address of the server to Proxy to should be the IP or the whole url where the api is hosted ( with public IP).
Please suggest.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, there are two different EC2 integrations, one for configuring the proxy, another for configuring lambda.
I put the instructions for Amazon Lambda Integration. Sorry, if you're looking for the Amazon API Proxy integration it is slightly different. Can you please let me know if you're looking for a Proxy or Lambda integration?
Tony Tam
SmartBear VP of Swagger Products
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@fehguy Wait I will check...please be online I need your help till I figure everything out about integration
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I did it now in Aws where can I see my api ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which integration are you trying to do? Proxy or Lambda?
Tony Tam
SmartBear VP of Swagger Products
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, it's pretty late so I can follow up in the morning. But in general, once you have pushed to the Gateway, you should sign into the AWS console and select the region that you have pushed to.
Select the API Gateway link and you should see the API that you have pushed, by the title name.
Tony Tam
SmartBear VP of Swagger Products
