AWS Zero to Hero Day 4 - part-1

Amitabh soniAmitabh soni
3 min read

Tasks for the day:

  1. Read about AWS RDS, DynamoDB, and AWS Lambda, and write a post on LinkedIn with an example in your own words.
    Ans:

    • AWS RDS: Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks.

    • AWS DynamoDB: Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. You can use Amazon DynamoDB to create a database table that can store and retrieve any amount of data, and serve any level of request traffic. Amazon DynamoDB automatically spreads the data and traffic for the table over a sufficient number of servers to handle the request capacity specified by the customer and the amount of data stored, while maintaining consistent and fast performance.

    • AWS Lambda: With AWS Lambda, you can run code without provisioning or managing servers. You pay only for the compute time that you consume—there's no charge when your code isn't running. You can run code for virtually any type of application or backend service—all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability.


  1. You are part of a team responsible for migrating the database of an existing e-commerce platform to Amazon RDS. The goal is to improve scalability, performance, and manageability. The current setup uses a self-managed MySQL database on an on-premises server. 👇

    What needs to be done:

    • Set up and configure a MySQL database on AWS RDS, ensuring optimal performance.

    • Establish a connection between the RDS instance and your EC2 environment

Ans:

1. Created an RDS with connecting to an EC2 Instance

  1. After the creation of RDS, connected to the EC2 instance that is attached to RDS and updated the system

  2. After that, I created an IAM role for EC2 service with RDS and CloudWatch full access, and attached it to my EC2 Instance.

  3. After that, I launched the EC2 and installed the MySQL client using the command sudo apt install mysql-client -y

  4. and then ran this command and entered the password, and connected to my RDS MySQL command: mysql -u admin -h [database-1.c3w68q0ggwwn.eu-west-1.rds.amazonaws.com](<http://database-1.c3w68q0ggwwn.eu-west-1.rds.amazonaws.com/>) -P 3306 -p

    where database-1.c3w68q0ggwwn.eu-west-1.rds.amazonaws.com It is the EndPoint of my RDS DB.

  5. Then I created a database ‘aws’ using the command create database aws;

  6. To check whether the database is created or not, I ran this to show all databases: show databases;

  7. Then I used that database using use aws

  8. After that, I created the table using the command CREATE TABLE learners (learner_id INT, learner_name VARCHAR(50));

  9. then i inserted two data into the table

    1. insert into learners (learner_id,learner_name) values (1,"shubham");

    2. insert into learners (learner_id,learner_name) values (2,"Amitabh");

    3. Output select * from learners;

0
Subscribe to my newsletter

Read articles from Amitabh soni directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Amitabh soni
Amitabh soni

DevOps Enthusiast | Passionate Learner in Tech | BSc IT Student I’m a second-year BSc IT student with a deep love for technology and an ambitious goal: to become a DevOps expert. Currently diving into the world of automation, cloud services, and version control, I’m excited to learn and grow in this dynamic field. As I expand my knowledge, I’m eager to connect with like-minded professionals and explore opportunities to apply what I’m learning in real-world projects. Let’s connect and see how we can innovate together!