I'm new to API Gateway, and as far I have tried is a really powerful tool. For the project I'm working right now we are using a PostgreSQL instance in RDS. I've seen that is possible to access directly to DynamoDB tables from API Gateway, so I was wondering if is there a way to do so for relational databases. So I created a resource with a GET method and configure it to connect to my database, but I wasn't sure if I used the right parameters:
Provided information about the target backend
So I wasn't sure about the arguments in each setting's field. In AWS Subdomain I wrote the public URL as if I was connecting from my pgAdmin client (no port because the full structure was not accepted, so I know I'm doing something wrong). Before that I tried using the ARN of my RDS resource, but this error appeared:
AWS ARN for integration must contain path or action
For the execution role I created one with the policies to access my Postgres resource.
Reading RDS documentation I found out that is possible to use the Query API from RDS using the HTTP verb GET or POST and a Query parameter named Action, so I tried to figure out how to place my query statement in this way:
But when I test the method, this is the Response Body:
{
"message": "AWS ARN for integration contains invalid action"
}
And this is these are the Logs:
Execution log for request test-request
Sat Mar 19 15:27:17 UTC 2016 : Execution failed: AWS ARN for integration contains invalid action
Sat Mar 19 15:27:17 UTC 2016 : Method completed with status: 400
I know I'm doing a lot of things wrong, so does anybody know if this is actually possible and how to do it, because I haven't found any detailed tutorial yet.