https://github.com/mattyboy84/aws-api-query-rds
AWS Rest API that invokes a lambda that queries a private RDS database
https://github.com/mattyboy84/aws-api-query-rds
api aws networking portfolio rds-database
Last synced: about 1 month ago
JSON representation
AWS Rest API that invokes a lambda that queries a private RDS database
- Host: GitHub
- URL: https://github.com/mattyboy84/aws-api-query-rds
- Owner: mattyboy84
- Created: 2023-03-06T20:42:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T07:15:47.000Z (over 3 years ago)
- Last Synced: 2025-06-24T06:04:41.041Z (about 1 year ago)
- Topics: api, aws, networking, portfolio, rds-database
- Language: JavaScript
- Homepage:
- Size: 167 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API-query-RDS

---
# Setup:
1. Deploy project to aws
2. Copy the `RDSDBSecretArn` output by the stack
3. Go to RDS & select `Query` on the database
4. enter these credentials with the `Secrets manager ARN` as the `RDSDBSecretArn`

5. create the `Customers` Table
```sql
CREATE TABLE Customers (
CustomerId int,
FirstName varchar(255)
)
```
6. create a few example customers
```sql
INSERT INTO Customers (CustomerId, FirstName) VALUES (100, 'Name');
INSERT INTO Customers (CustomerId, FirstName) VALUES (101, 'Name1');
INSERT INTO Customers (CustomerId, FirstName) VALUES (102, 'Name2');
```
7. make a `GET` request to the `HttpApiUrl` output by the stack. Making a GET request to `https://ID.execute-api.region.amazonaws.com/CustomerId/100`. You will recieve:
```json
[
{
"CustomerId": 100,
"FirstName": "Name"
}
]
```