- Newest
- Most votes
- Most comments
Hi,
You can use postgree REST API, refer to the below article. https://medium.com/the-dev-caf%C3%A9/creating-a-serverless-rest-api-with-node-js-aws-lambda-api-gateway-rds-and-postgresql-303b0baac834
Hi,
There are some factors I think you can consider before choose the service to be used. One of example, number of expected traffic , traffic pattern, scaleability and security. You can consider some of services combination:
In high level overview with assumption you will handle huge write and read traffic:
- Api management (for security, canary deployment) + Load balancing (service to distribute traffic) + compute layer (to run Postgrest).
- For Api management you can use = API Gateway
- For Load balancing you can use = ALB
- For compute layer you can use = EC2+auto scaling group, EKS, or Lambda. Since i read that Postgrest has docker official image also = https://hub.docker.com/r/postgrest/postgrest/.
- For caching you can use = ElasticCache
- For message queing you can use = SQS
- For security protection such as to handle from SQL injection can use = AWS WAF integrated with Api gateway or ALB
- For connection pooling you can use = RDS Proxy
Sample solution combination can be like this:
- Api gateway + ALB + EC2 and auto-scaling group
- API gateway + ALB + EKS with Karpenter
- Api gateway + ALB + Lambda
Please read this reference to help you decide if you want to choose serverless or kubernetes: https://aws.amazon.com/architecture/serverless/serverless-or-kubernetes/.
Then, for frequent data which required sub mili latency you can enable caching to some API endpoint Api gateway + Elastic cache. And you can also consider to push some write request into SQS for queue before handling it to Postgrest. For security you can integrate AWS WAF to protect api gateway or ALB. And finally to improve your api you can consider use RDS Proxy to help with connectoin pooling (multiplexing) management.
Please alo do due diligence of above services and feature availability in your region: https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
Thank you hope it can give some insight for you.
Relevant content
- Accepted Answer
- asked 3 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
- How do I use an interface VPC endpoint to access an API Gateway private REST API in another account?AWS OFFICIALUpdated 6 months ago