Reputation: 53
I have an Amazon AWS RDS (PostgreSQL) database. I am trying to connect it to Amazon API Gateway as simply as possible (AWS Service WITHOUT Lambda).
I am trying to perform a simple get request. To get all "animals" (table name "animals") from the db.
The question is which Action to select. All actions in the documentation change the db. And I need only to perform a simple GET request.
Also we need to setup the policy and specify the actions for it.
Api Gateway request:
https://i.ibb.co/2hkdVqZ/AWS.png
Api Gateway Policy:
https://i.ibb.co/vk8pLzd/AWS2.png
Upvotes: 4
Views: 1595
Reputation: 200657
The AWS API is for creating/changing the DB server itself, as you have mentioned. You can't query the RDS database directly from the AWS API. You have to create a DB connection to the PostgreSQL database using traditional database drivers in order to run queries against the database.
You will need to use a Lambda function to accomplish what you are trying to achieve.
Upvotes: 4