EC2 Connection / RDS / Git Clone / How do the commands run? - sql-server

Situation.
AWS Console.
Created RDS.
Actions > setup EC2 Connection (it works, no problem)
Git cloned my repo to the EC2 instance (it works, no problem)
I can remote into my RDS database (it works, no problem)
My Problem
How do I run anything from my repo against the database though? in order to do so I have to remote into the RDS but then it cant see the repo I cloned..
What am I trying to do?
I want to import mssql mock database from my repo into the RDS but when I remote into the RDS via EC2 connection the RDS only wants RDS commands, it's as if it doesnt see my EC2 connection or repository...
Any tips? anyone see this before? .. I'm testing this model for a job I'm doing at work, but I can't get any scripts or other repos for other things working against the RDS database because when I remote into the database it doesn't care where or what repo I was on before...
Help!

Related

How to find out if an instance in aws ec2 dashboard is an app server or db server?

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.

Unable to connect to Amazon RDS for PostgreSQL instance

I'm currently setting up a Amazon RDS for PostgreSQL database and connection fails every single time. I've remade the Amazon RDS for PostgreSQL instance 3x now, both with default out of the box settings and custom settings, and even tried putting creds on pgAdmin, no dice. I've tested another database connection and it works just fine.
I'm setting it to be public accessible as well, with username and database both just "postgres". What am I doing wrong?

aws deployment, web app on ec2 and ms sql db on RDS

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.

AWS RDS SQL Server Migrate DB from Outside

Today, I am using AWS EC2 DB Instance for my database (SQL Server).
I want to change the instance and instead to use RDS instance for my SQL Server.
In order to complete the migration from EC2 to RDS I need to pass the database with all its tables/stored procedures/types/views etc.
I tried to backup the database of the EC2 instance and then restore it in the RDS instance but I get the exception:
Moreover, I tried to generate a script of the EC2 instance DB and then run the script on RDS SQL Server connection but it failed to run many of the scripts because of permission exceptions.
I also found an article from the AWS documentation that shows that it is possible to upload a backup to S3 bucket. But I couldn't manage to understand how to restore the backup from the S3 bucket in the RDS instance.
Please, help me figure out how to do it? I belive it must be possible and easy somehow.
Thanks in advance.

AWS EC2 Linux take iOS client command to execute python script to query database in RDS

I currently have an EC2 Amazon linux instance running, I have some python scripts I have created and stored in my cgi-bin. I am having my iOS client (iPhone app) make an http request to execute the python scripts located in the cgi-bin directory of my EC2 instance, which then the script makes a request or insert into my MariaDB which is hosted on a remote database server by the RDS service provided by amazon.
Is this a safe practice method to execute commands? I want to know whats the best way to make calls into the RDS database from the EC2 instance that gets triggered by a python script which is called from an iOS device. Should I take a different approach?
The security of your RDS database is dependent on the security of your python script. If you have configured your EC2 and RDS instances correctly they should be in the same VPN and your RDS instance should not be exposed outside of the VPN.

Resources