Create and Connect PostgreSQL Database with Amazon RDS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey i'm sadam and i'm a web developer let's let's start learning about how we can create a database using our ds relational database system a service provided by amazon web services so rds provides you a feature through which you can create a database instance that will be hosted on the virtual private cloud that is again a service provided by the amazon itself now using this rds we will create a database instance in that instance we can create multiple databases as per our requirement okay so let's start with the tutorial first first we will open the aws management console go to firefox and open the aws management console here you can see rds option since i have or recently visited this service but if it is not visible there just go to this drop down menu services under this database option there will be an option called rbs click on this rds and it will redirect you to this rds management console here we are here you can find an option under this create database headline there is an option called create database just click on that and you will find the option to create the database there are two options to like there are two creation methods one is standard field the other is easy clear if you choose this easy create method most of the information will be set by default through amazon but i don't want to do it i want to enter each and every details as per my requirements so just go to this standard clear and here are six services engines so amazon provides you six database engines so that you can you can use any one of them like mysql amazon aurora mariadb postgas sql oracle and microsoft sql server here are six database engines that are provided by aws for this tutorial we'll just go with post the postgresql and we'll keep the version as just as default that is that has been said by amazon itself and again here are three options production level development or testing level or free tire so we we just go with free tier option i just prefer to make it free for the initial purposes right then you can even pay as much as you want if you have lot of money and if you have so much services to use you can just pay for them but for now let's go with free there okay so here this is a database instance identifier so here we need to provide a database instance name make just mind that this is not a database name i made the mistake initially while doing this thing this is not a database name but a database instance name exactly the same as ec2 instance if you heard about ec2 instance it is uh it this ec2 instance is created on ubuntu on amazon amazon linux or microsoft like you know my windows windows so you can you can create easy to instance and you can do anything and everything uh with that terminal with the cloud service similarly database this is a database instance which is being created on a virtual private cloud that is again provided by amazon web services so use if in this instance in this database instance we can create multiple databases as per our requirements i hope you get it so here i will just rename it to my database instance my database instance now coming to the credentials part uh we need to provide a master master username here we will just provide sadie username sadie password is 70 one two three four five six okay one two three four that's it yeah uh yeah we are done with this credentials part here here just uh there is only one option you don't have many other options so just make it by as default whatever it is in this storage part there will be three options just go with the general purpose ssd we don't need to make it much like you know resourceful like we just need to make it and now just make it just keep it as default as it is there allocated storage is 20 gb and all storage auto scaling here just make it by default whatever it is okay so we are done with the credentials part then go to just db instance class keep it by default whatever it is they already there and there we can we can we have storage in this storage again there is again a three options we'll just go with the by default one general purpose ssd keep it as it is 20 gb storage and yeah okay so here is the connection part this is the virtual private cloud this is exactly where our database instance will be stored will be hosted like let's say there is a cloud and inside that cloud we have us a database instance that is residing on that cloud okay now inside that database instance again we'll have a database that we will um call or will be using to store data coming from the websites and all okay so here i will be using the default virtual crowd that that has been already set and if the subnet group also default obviously there is no other options and here this is this is very important part you know in this public access also if you want to learn more about what this this means just click on this info link here you can see or everything about that so here it is uh saying that uh this whenever you click on this yes button yes radio button it will give you the access to use this database to access this database from your local machine that will see how we can access it with the local business since right now this database is hosted on this virtual private cloud so if it is selected no will not be able to access it outside this environment like we will not be able to um access it outside the environment okay then uh coming to this private vpc security group if you have if you have learned about uh if you have used okay if this is security group you have we'll just choose the create new one name or like taste sadie vpc we have just named it whatever name you want you can give i select a zone availability zone distance since it is i just prefer to keep it here only that's not a big deal keep this database port as 5432 the default one don't need to mess up with it then keep it at by default as whatever it is here here comes the database name okay so as you can see it is saying that if you do not specify a database name amazon rds does not create a database so if we keep it blank there will be no database that you can there will be no database created by default but we want to create a database while creating this database instance like whenever this database instance is created it will contain a database with its earth as well so let me name it first test db yeah first test and leave this parameter group as default backup automated yeah yeah backup window no preference just keep this as default don't need to mess up with these things because we we just don't need that right now here retention period seven uh you this whenever whenever you keep any backup this backup will stay there for seven days let's say you have a database and on 4th july 2021 you have backed up all the data from that database then this backed up database that has been backed up in another location it will stay there for seven days that is until 11 00 and right yeah so yeah it will stay there for 11 until 11 july 2021 okay so yeah this is what it is and we just make them as different just leave them as default don't need to mess up with these things and they will enhance monitoring you don't want to do this as well if it is leave it at it here it is yeah so again protein database be deleted accidentally if you if you uh check this on you will not be able to delete this database so i'll just leave it you know i'll just make it leave it at it as it is don't need to check on check on this one okay so we are done with all these setup and just click on this clear database sorry hi okay so here i can't use these characters like i can't use this hyphen but we can use underscore so update that and yeah we are good to go so create our just click on the create database button and it will just load i don't want to save this right now so here it is this you can see the status is creating the database instance also in here you can see it is loading and starting creating database my database instant which is my name of my database instance once it is ready we can connect this database instance with our pg admin that is that we will just see how we can do that we just download the pg admin use that to connect with this database instance so that we can create any database like any number of database as per our requirement and do all the operations whatever we generally do with our databases so you can see the status has been changed to available that means our database instance has been successfully created and posted on vpc virtual private cloud now we can use this database instance to create multiple other database inside it this is you can consider as a database server inside which we can create multiple databases as per our requirement so first of all let's let's download pg admin here in this through this pg admin we will be connecting it with the server since we don't want to go to terminal just click on the any any download link i would prefer to go with this 5.3 version second latest version since the most recent version most of the time comes with bug so i don't prefer to go with this first one just go with the second one since i'm already uh i've already installed pg admin i'll just open it from here and it will just open my default browser google chrome here this is a default server that i have already right now i i want to connect this database server the database instance with pg admin so for that go to objects create and secure server here is give any name maybe i want to give rds rps database i i want to give this name rds database and either host name or address or server must be specified okay we want we need to provide these names for that we need to jump in there here in the section host name or address we are supposed to go to view create new collection details there you can find an endpoint url just copy this endpoint url paste it here leave the port as 5432 if you have remember to have set the port here or or also you can find the port here as well i don't know i don't do anymore yeah okay so here is the port if you didn't remember just go to connectivity and security you can find the port number here so you need to mention the same port and then the database name that's where it is let me check it out yeah so here is the database name copy this same database name to here maintenance database name and yeah or or or you can just leave it as it is postponed that is by default database that comes with this pg admin you know then here we need to provide the username username is already there if they just need to copy this if you want to type my password is sati123456 just don't try to access to this database instance of mine because i just delete it after this tutorial and now create the type okay we have clicked on this save button and our database is ready here you can find three databases and this is the first test database db is our initial database that we had created while creating this my my database instance all right so this database help is is available here right now so successfully we have connected this pg admin with our mice sorry with our postgresql sql database instance that we had created just now we through rds provided by aws management aws now you can go to test here is already her test it might not be there for you because i have created you can go to right click on that go to create and there will be test one you can just name it test one add one column maybe username uh yeah i hope you know this this is not the aim but i'm i am of this tutorial but i'm just showing you that and just you need to show you that it is working so yeah you can find that the table just one table has been created and the all these all these things are all these things will be affected here all these things will be affected here in the my my database instance that we have just created on rds if you have learned something or anything from this video make sure to share it with all your friends and let them learn and grow also make sure to hit the like button below and don't forget to hit the subscribe button so that you get notified again when i come a new informative video like this
Info
Channel: Saddam
Views: 44,562
Rating: undefined out of 5
Keywords: aws, amazonrds, postgresql, database, pgadmin
Id: XDMgXZUfa10
Channel Id: undefined
Length: 17min 40sec (1060 seconds)
Published: Sun Jul 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.