I have deployed .net web application on EC2 instance and database on RDS.
what are the changes i need to make in my application so that web app can access database which is on RDS.
You have couple of checklist that you need to do.
Make sure your AWS RDS Security Group(SG) InBound Rules allows your EC2 traffic to pass through. You can refer to the below Screenshots on how to navigate to RDS SG
Make sure that your RDS DB Instance is in status "Available"
Lastly, make sure you have the right Db adapter in your application code that will initiate the connection.
Related
How to find out if an instance showing under AWS Ec2 Dashboard is an app server or db server?
I am new to AWS, so any help is much appreciated.
It is just a question. We have been given one instance name which we can see in the Ec2 Dashboard and we have been asked if it is an app server or db server and share the details.
There is no such thing in the EC2 dashboard because every EC2 instance is just a virtual machine, the Amazon interface does not care what is actually running on your virtual machine.
However, within the AWS Console there is a seperate service called Amazon RDS which is a fully managed database service where you can make dedicated relational-based databases.
If you would like to find out if your EC2 is an "app" or "db" server the only way to do that at this point would be to SSH into the server and check what is running on the machine.
I have an autoscaling group that includes a launch template. In this launch template, I have included user data script to connect to the RDS instance on boot.
Is there a way to securely access RDS instance from the EC2 Autoscaling group?
Many thanks your help!
Extra info
PHP application on EC2 WebServer, it's basically just a simple form that sends data to RDS.
The following are some guidelines for accessing RDS securely from EC2:
Keep traffic within a VPC. RDS should be in a private subnet and EC2 instance(s) should be in private subnets as well
Lock down security group access. Configure the RDS instance to allow access only from the EC2 instances. I always suggest creating a DB server security group, and then a client security group. The DB server security group (attached to the DB instance) allows access from the client security group (attached to the EC2 instances).
As Kumaresh Babu N S suggested, use secrets manager for storing and retrieving DB credentials. There is also an option for automatically rotating the DB password with secrets manager for an extra layer of security.
We have a WinForms desktop app that connects to a remote server to pull some data. The remote server hosts a web service on a standard IIS website that queries a SQL Server database installed on the same machine. Today, if the remote server is under maintenance or not available our end-user cannot retrieve the necessary data.
Now I am requested to make this feature fault-tolerant. Here are my questions:
Should I ask for another remote server that runs the same web service and move the DB to a third remote server? So the two web services can connect to the same DB?
Should I consider moving the web service logic to the WinForms desktop app and connect directly to a remote DB paying a first-class 99.99% availability service?
Do AWS or Azure provide a ready-to-use solution that fulfills my requirements?
Is there any other option I didn't consider?
I am using GoDaddy VPS server for over an year, now i am planning to migrate to AWS, go i have got GoDaddy VPS server with validity until next 5 years. i have a website hosted in AWS also, its very very fast compared to the site hosted in GoDaddy. I think the problem is the big database. So i thought of creating a AWS RDS MySQL database and use that particular database to the site hosted in GoDaddy. But i don't have any idea of how to establish the connection. If it is possible kindly anyone give me some tips. Thanks
Yes. You can connect to an Amazon RDS instance from outside the AWS network (note: when you create the database you can specify whether it is publicly accessible or accessible from the VPC only)
Of course, the bandwidth and latency will be worse compared to an EC2 located in the same region as the RDS server.
So I don't think this will solve your performance problems. It does offload the database management (backup/restore/monitoring) to AWS which is very useful for a production system.
my project requires me to use PHP and connect to the oracle database service hosted by our department. I want to use amazon ec2 to deploy the project. Is it able to connect to an external oracle database from amazon ec2 by PHP?
I've tried google app engine. It doesn't support external database connection. what a drawback!
Yes, it does. By default, Ec2 instances launched in EC2-Classic have full outbound access. So, the Ec2 instance can connect to your Oracle DB Provided your Oracle DB is accessible over the internet (in other words, your Oracle DB has a public IP address and you have firewall rules configured on your end to allow inbound access to Oracle DB).
If you Oracle DB is in a private network, then you need proxy server or SSH tunnel (or something similar) to connect to the instance.
Overall, there is no limitation on EC2 side.