directus with the serverless rds is not scaling down - amazon-rds

We have setup the directus on fargate and chose the AWS serverless RDS as database
When we are not using directus then also the serverless rds is not scaling down to 0.
Does any one faced this issue?
Thank you

Related

Imperva - Data security Fabric - diagnostic logs RDS in AWS

I am install data security fabric in my company, i work with postgre in heroku api in conection on AWS. i need collectar logs RDS for Imperva data security audit, is possible used heroku? wath logs is send for the RDS AWS? It is possible work with what is send for AWS?
I'm connect is AWS, but not moving in install

Connect to AWS RDS Aurora for Postgres from Node JS

I have a Node JS application hosted on EC2 instances that I am trying to connect with an RDS Aurora Postgres cluster. The cluster consists of 1 writer and 2 readers. I have whitelisted the security group attached to the EC2 instances as an ingress rule on the security group associated with the database cluster which allows the EC2 instances to communicate with the database in the cluster.
I am having some issues connecting the application on the EC2 instance to the database. I have read this link, but that discusses using a JDBC driver in order to connect the database. I'm not sure if I can use a JDBC driver to allow a Node JS application to connect to this database cluster. I'm not finding any useful examples to connect a Node app to Aurora Postgres.
Any advice on connecting Node JS to Aurora Postgres DB cluster would be helpful.

best practice to deploy nodejs app on aws ec2 instance

I have deployed nodejs app on ec2 instance. I have used atlas for mongoDB, load balancer, Aws ssl to secure the connection and pm2. As iam already using aws load balancer should i need to use nginx. What is the best practice of deploying nodejs app on ec2. if i need to use ngnix where to configure http to https redirect?
Looks like you need a web application to be developed. I would suggest below architecture. enter image description here. This will eliminate pain of hosting/maintaining servers.
All AWS components can be programmatically integrated using AWS SDK and Amplify is a wrapper on top of this.
Develop your UI in any JavaScript framework and host it in AWS S3. Using CloudFront you can cache the UI layer. Put an API gateway layer which will intercept all the traffic from your UI. Using AWS Amplify can very much simplify your UI development with a lot of built-in wrapper components. It comes with CLI which can be used for deployment as well.
Host your Spring Boot+DB Driver (or NodeJS/C#/PHP/Python/etc.) Application with Rest API in AWS Beanstalk. BeanStalk can be configured with Load Balancing, Auto Scaling Group, etc. If AWS Beanstalk seems complicated for you, consider using AWS Lambda (Serverless, microservices) architecture.
AWS DocumentDB is a MongoDB extension and maybe you can leverage it. Which is again a highly scalable, very flexible NoSQL in this case.
You can leverage AWS Cognito (https://www.slideshare.net/awsugkochi/acdkochi19-enterprise-grade-security-for-web-and-mobile-applications-on-aws)to store User credentials in groups and add permissions and authenticate/authorise the users.
In API Gateway you can configure AWS Cognito Authoriser and protect the APIs from un-authorised calls.
Some of the auxiliary services can be used to integrate email/SMS etc. AWS SNS (Pub/Sub) + SQS (Queue) -> If you want to decouple any process, you can use SNS + SQS. You can send e-mails using AWS SES. AWS Route53 is the DNS and your domain can be hosted here.
If you have to upload any files to cloud and store it for users, leverage AWS S3.
You need to protect internet-facing components like API Gateway and Cloudfront using AWS WAF.
All these systems generate logs and it can be accessed from AWS cloudwatch. Your APIs can be monitored for performance and errors using AWS X-Ray.

Is it recommended to use Docker with AWS Elastic beanstalk?

I'm deciding how to deploy my Nodejs API to AWS Elastic beanstalk. I have 2 options: deploy it as a normal nodejs service or deploy the api dockerized.
In which situations is it more recomendable to use docker over a normal nodejs service? (Giving the fact that I will use Elastic beanstalk)
Running your NodeJS as a Docker container in Elastic Beanstalk will definitely give you more control over your application.
However, it depends how much time you want to invest. Their maybe slightly more time in deploying with Docker, especially if you haven't used it before.
In which situations is it more recomendable to use docker over a
normal nodejs service? (Giving the fact that I will use Elastic
beanstalk)
First, if you really interested to run docker container in AWS, then ECS is what you need to run your application, lot of reason to run docker in ECS over elastic beanstalk
Serverless (faragate)
Scaling
Container management
Ci/CD with code deploy etc
Amazon Elastic Container Service (Amazon ECS) is a fully managed container orchestration service. Customers such as Duolingo, Samsung, GE, and Cook Pad use ECS to run their most sensitive and mission-critical applications because of its security, reliability, and scalability.
AWS ECS getting-started
docker is recommended if you manage multiple environments in short as its not simple question to answer but better to go with Docker as this what future deman, if you just want to want to run dev like environment then elastic beanstalk is fine.

AWS elastic beanstalk Node.js app is not connecting to Mongodb atlas

I am trying to connect to MongoDB atlas from elastic beanstalk using a Node.js app. on Mongo atlas, I opened the connection publicly for testing reasons (added 0.0.0.0/0 to the whitelist) and AWS security group allows all traffic.
I still can connect to MongoDB atlas from my localhost but not from AWS EBS.
Even I have faced the same issue and it solves by restart the aws elastic beanstalk instance.
Actually, we open do MongoClient.connect once when your app boots up
and reuse the db object. It's not a singleton connection pool each
.connect creates a new connection pool.
So for that purpose, we have to restart the instance and it will work but for the security purpose, we can try VPC Peering for MongoDB Atlas.
Hope this will help some one else..!!

Resources