Aurora Database Project π
Welcome to the Aurora Database Project! This comprehensive guide is designed to help you create and connect an Aurora MySQL database to an EC2 instance step-by-step. ππ Login with Your IAM User
Step 1: Login to AWS
To get started, log in as your IAM user, not your root user.- Open the AWS Console.
- Log in using your IAM Admin User credentials.
- If you donβt have an IAM user, create one:
π Create an Aurora MySQL Database
Step 2: Check Your AWS Region
- Locate the region dropdown at the top-right corner of the AWS Console.
- Ensure all resources (RDS, EC2, etc.) are created in the same region.
Step 3: Create Your Aurora Database
- Open the RDS Console (search for βRDSβ in the AWS search bar).
- Click Databases > Create Database.
-
Configure your database:
- Engine type: Aurora (MySQL-Compatible)
- Engine version: Aurora MySQL 3.05.2 (compatible with MySQL 8.0.32).
- Template: Development/Test
-
DB Cluster Identifier:
aurora-cluster -
Master Username:
admin -
Master Password: Strong password (e.g.,
P@ssw0rd123) -
Instance Class:
db.t3.medium - Enable Storage Autoscaling for flexibility.
- Ensure the VPC and Subnet Group match your EC2 instance.
- Leave other settings as default and click Create Database.
π¨ Note: Auroraβs storage scales automatically, but charges may increase with usage. Monitor your RDS usage in the AWS Billing Console.
π₯οΈ Launch an EC2 Instance
Step 4: Create a Virtual Web Server
- Open the EC2 Console.
-
Click Launch Instance and configure the following:
-
Name:
web-server - AMI: Amazon Linux 2023 AMI (or any supported Linux OS).
-
Instance Type:
t2.micro(Free Tier eligible). -
Key Pair: Create a new key pair and download the
.pemfile for SSH access. -
Networking:
- Ensure the EC2 instance is launched in the same VPC as your Aurora database.
-
Attach a security group with:
-
Inbound Rules:
- SSH (port 22): Allow your IP.
- MySQL/Aurora (port 3306): Allow traffic from the EC2 instance.
- HTTP/HTTPS (ports 80/443): Allow public traffic (optional).
-
Inbound Rules:
-
Name:
- Click Launch Instance.
π Connect EC2 to Aurora Database
Step 5: Test Connectivity
- SSH into your EC2 instance:
- Install MySQL client:
- Test the connection to your Aurora database:
<Aurora-Endpoint> with your RDS endpoint from the AWS Console.
π Next Steps
- Create a sample database and table in Aurora using the MySQL client:
- Develop a web application that connects to your Aurora database.
- Deploy your web app and test database interactions.
π© Clean Up Resources
To avoid unnecessary costs, delete unused resources:- Delete the RDS Cluster: Go to the RDS Console, select your database, and choose Delete.
- Terminate the EC2 Instance: Navigate to the EC2 Console, select the instance, and click Terminate.
π Additional Resources
Good luck and happy coding! ππ§ Contact
For questions or feedback, reach out: π¨ Email: [email protected] π Portfolio: Brian Kimemia GitHub: BrianKN019Thank you for exploring this project! Letβs innovate and build secure AWS solutions together. π