Task 3:
Introduction to Amazon Relational Database Service (RDS)
Description:
Amazon Relational Database Service (RDS) is a fully managed web service provided by Amazon Web
Services (AWS) that simplifies the setup, operation, and scaling of relational databases in the cloud.
Amazon RDS currently supports eight database engines:
Open Source: MySQL, PostgreSQL, and MariaDB.
Commercial: Oracle, Microsoft SQL Server, and IBM Db2.
AWS-Built: Amazon Aurora (MySQL and PostgreSQL-compatible), which offers enhanced
performance and high availability.
RDS vs. EC2
Use Amazon RDS: If you want to focus on application development and offload database
management, patching, and backups to AWS.
Use Amazon EC2: If you require full administrative ("root") access to the database and
underlying OS for extensive customization or specialized configurations.
Database Creation
1. Sign in to AWS Management Console:
o Go to the AWS Management Console.
o Sign in with your AWS account.
2. Navigate to Aurora and RDS Dashboard:
o In the AWS Management Console, search for Aurora and RDS in the services
menu and click on it.
3. Creation of Database:
o Click the Create database button.
o Choose an Easy Create option
o Select PostgreSQL in configuration.
o Choose Free Tier in DB Instance size
o Give DB Instance identifier and Master username
o Under Credentials Management choose self-managed
o Give master password(admin123)
o Click on Create Database (Wait till the Database status turns out to be Available)
Note: By Default Databases are not publicly accessible, hence we need to make it publicly
available.
4. Modify the Database:
o Select the Created Database
o Click on Modify
o Expand Additional Configuration tab In that select Publicly Accessible
o Scroll down and proceed by clicking on continue
o Select Apply Immediately and click on Modify DB Instance (Wait till the Database
status turns out to be Available)
5. Changing the Policy from default security group to defined Security Group:
o Click on database
o In Connectivity and Security tab Choose Connect using Endpoints
o Copy the end point([Link])
o Copy VPC (vpc-0edea42ad37e8b364)
o Find initially VPC security group as default(which will not allow public incoming
requests)
6. Add New Security Group
o Go to EC2 Dashboard
o In the left menu under Network & Security Click on Security Group
o Create Security Group
o Give Basic Details (Name, Description etc)
o Click on Inbound rules add RULE select Type=PostgreSQL, Source=Anywhere
IPV4
o Create Security Group (If error prompted set CIDR to [Link]/0)
7. Attach this Security Group to the database
o Go to RDS Dashboard
o Select Database Click on Modify
o Go to Connectivity Tab Attach new security group and remove default security group
o scroll down and click on continue
o SELECT Apply immediately--->Click on Modify DB Instance
8. Launch PGADMIN
o On the left side Menu find Servers (Right Click on it)
o Select Register
o Choose Server
o Give name in General Tab
o Switch to connection Tab Copy end point
o Type password(admin123)
o Enable Save Password
o click on save button
9. Using Created Server for writing SQL Commands
o Expand the created server in the left menu
o Expand Databases
o Expand Postgres right click on Postgres
o click on Query Tool (Write Queries)
Note: You can Write SQL queries for creation of tables, inserting data into tables etc., All
the Queries that are written in PGADMIN client software on your host system when executed
makes changes to the database that we created in AWS cloud platform and the output of
these queries is returned back and can be viewed on the same client software.
10. Deletion of the Database
o Select Database
o Go to Actions Choose Delete
o Uncheck Create Final Snapshot
o Uncheck Retain Automated backups
o Check I acknowledge that upon instance deletion, automated backups, including system
snapshots and point-in-time recovery, will no longer be available.
o Type DELETE ME
11. Delete the Security Group