VPC - Virtual Private Cloud is a commercial cloud computing service that provides a virtual private cloud, by provisioning a logically isolated section of Amazon Web Services Cloud.
![Screen Shot 2023-12-17 at 19 44 11](https://private-user-images.githubusercontent.com/87159434/291093532-30fbc2ec-c44c-45d3-a60c-a18f577ad7bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTM1MzItMzBmYmMyZWMtYzQ0Yy00NWQzLWE2MGMtYTE4ZjU3N2FkN2JmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiNGNjYzczODBjMzNhNDA3ZDY0OWM5ZDc4ZWVmZjM4NjlhNTZhMGRiZDZlYjI1YjMwZjgyMTk3NjYxZWRhZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.aB1qqjWQ4w96APpIhW3sTsl77hzGrIVhqY54GN0xBb4)
The DNS hostnames attribute determines whether instances launched in the VPC receive public DNS hostnames that correspond to their public IP addresses.
An internet gateway is a virtual router that connects a VPC to the internet.
aws ec2 attach-internet-gateway --vpc-id "vpc-08c6e4ccb8b131621" --internet-gateway-id "igw-08a034af09f3ce082" --region us-east-1
To add a new subnet to your VPC, you must specify an IPv4 CIDR block for the subnet from the range of your VPC. You can specify the Availability Zone in which you want the subnet to reside. You can have multiple subnets in the same Availability Zone. You can optionally specify an IPv6 CIDR block for your subnet if an IPv6 CIDR block is associated with your VPC.
![Screen Shot 2023-12-17 at 20 08 00](https://private-user-images.githubusercontent.com/87159434/291094850-cdd15c37-bb4b-4320-8848-56d282de2152.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTQ4NTAtY2RkMTVjMzctYmI0Yi00MzIwLTg4NDgtNTZkMjgyZGUyMTUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxMjI0NTQ0MTE1MDg1YzVhZjcwYTI2NjQ4NTliNWM1YTZlYTdiNTI4ZGE1NTMxZjI3MjVmY2VhYTE5M2Q4ZmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.rxMfN_ks7-gLHYsrbbbl0bRnHo2i051K3SuoL_g4Ndg)
![Screen Shot 2023-12-17 at 20 12 13](https://private-user-images.githubusercontent.com/87159434/291095070-12355300-8636-4ef0-95f9-0f485b24d9e4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTUwNzAtMTIzNTUzMDAtODYzNi00ZWYwLTk1ZjktMGY0ODViMjRkOWU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyMjU3NjgzYjI3M2VlNDczMTEwNmI3MDg2OWM3YjRlMzU1NWJkMTZiM2Q4NjgwODY4NWM3YTI1Y2I4YTI0MTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GQk-TEADbn4838ye953fZ79kJRiQyAk-BnHPazyTxiU)
Edit the subnet settings to enable auto-assign public IPv4 address.
The auto-assign IP settings determines if, when you launch an EC2 instance, the primary network interface is assigned a public IPv4 address or IPv6 address by default.
Once we created the vpc a main route table was created automatically for it, a private one so lets create a public one as well and add routes
![Screen Shot 2023-12-17 at 20 23 53](https://private-user-images.githubusercontent.com/87159434/291096110-3811f77d-01ac-490d-b22e-ace4f5dd796a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTYxMTAtMzgxMWY3N2QtMDFhYy00OTBkLWIyMmUtYWNlNGY1ZGQ3OTZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUzYzUxM2VlOThjMzQwMTVlMjIxNzg2MDkwNjU5MzJhYTQwZTc4ZDg1ZTkwNDg2ZGRmMzc2YmZlYTVlZTAxNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QyGOB5XilILWIc7xu_ezFYOjt-SaiJJI125D7TQv58w)
![Screen Shot 2023-12-17 at 20 26 51](https://private-user-images.githubusercontent.com/87159434/291095829-ca2c326d-5ffe-40b9-a6a7-f6ac60729e2d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTU4MjktY2EyYzMyNmQtNWZmZS00MGI5LWE2YTctZjZhYzYwNzI5ZTJkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkYjYwYjNmMDNjNTA0ZjBmNDllNzk3NTUwMThhNTc5MTlmMTMwMWViM2MwN2JlM2NmNzJjNzJlNmJjMzFiZmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZnBs9oEspkihEbfAzqTYwEJF39jbuQTuK3lSbf5xSY0)
keeping in mind to associate the private subnet to the same availability zone as the public one
![Screen Shot 2023-12-17 at 20 51 16](https://private-user-images.githubusercontent.com/87159434/291097074-70e90c11-2566-4914-ac72-3a746a6aa2cf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTEwOTcwNzQtNzBlOTBjMTEtMjU2Ni00OTE0LWFjNzItM2E3NDZhNmFhMmNmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQxZGJkZGVhMjUyZDkzMTQwMTA3NThhMDllY2YwODIwOWQzYmE5NDVhYzYxOGZiNzA2YzIzMjg4OTE2OTg3NmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.y9K0eslJw4YOhILinsVSXWEWq-qF3nvEr1_iGiYD6qk)
what makes the 2 public subnets actually public is that they are associated in the public route table wich is 0.0.0.0/24
how the 4 remaining are private? bacause when we created the vpc the main route table was created wich is private, now when a subnet has not been associated with any route tables they auto associate with the main one.
The NAT gateway allows the instances in the private subnets (app + data) to access the internet
The private route table is associated with the private subnets and routes the traffic to the internet trough the NAT gateway
![Screen Shot 2023-12-17 at 22 06 17](https://private-user-images.githubusercontent.com/87159434/291102828-0f048e88-59e1-408b-836c-9904425840af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDI4MjgtMGYwNDhlODgtNTllMS00MDhiLTgzNmMtOTkwNDQyNTg0MGFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkNzJmNWUwZGQzNmFjYWRjZjMxNTIyODQ0MGYxZmYxNzAwZmZjMTU5NmE4ZjE0MjBmMzdjNzdkYWEwMzBkMTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fwpU0lZq5midoP-FXAT_GSH1hWbEdCP8G8Iwph3ZZLo)
after creating the nat gateway lets create the private route table and add a route to the NAT
![Screen Shot 2023-12-17 at 22 10 57](https://private-user-images.githubusercontent.com/87159434/291103108-49ac9da2-7776-47de-9b50-5b40c0f55a13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDMxMDgtNDlhYzlkYTItNzc3Ni00N2RlLTliNTAtNWI0MGMwZjU1YTEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFkN2I2OGYwMzcxZTE1NDVhNjgyMzdiZGE0M2JjOTk2MjhkZWI0MzBkYWEzYmUwYzE2MDkyZTJjN2MwZjM1OTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mHQ7fEofQPZ-us26owp_WvPhUCWZvzaNPi-qjgsp2P8)
now lets associate this private route table with the private subnets of az1
![Screen Shot 2023-12-17 at 22 15 18](https://private-user-images.githubusercontent.com/87159434/291103259-97dc5cca-0c79-489d-960e-7a415e467999.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDMyNTktOTdkYzVjY2EtMGM3OS00ODlkLTk2MGUtN2E0MTVlNDY3OTk5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2NmM0NDJjZWU1ZjI2NmQ4MDFmMjllZWIyNTVkMDNmYzdiOTQ4MWM2N2U2M2NkZmY5ZTFhNzg4NGEzZWNkYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bwN4ZS0ZfsOA0SXgKYHqPwAN8B9RoL9Q6VfsNQ5r4rQ)
and basically the same for az2 as well
A security group acts as a virtual firewall for your instance to control inbound and outbound traffic.
lets start with the app load balancer security group
![Screen Shot 2023-12-17 at 22 37 09](https://private-user-images.githubusercontent.com/87159434/291104285-ad363ead-52b6-446b-83cb-24cea6d38745.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDQyODUtYWQzNjNlYWQtNTJiNi00NDZiLTgzY2ItMjRjZWE2ZDM4NzQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1YzUzOGEzZThhOThmYTEwOThiOWRhNmU1MjYyZTRiZDA4MTcyMjZkZWU5ZmE2YWZiZGY5OTY1ZDJiMmJhZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QVBz_87ycvWH6F5ZTOYWk5tTWh9S0XfZ8ovgJBgHhEc)
then SSH
![Screen Shot 2023-12-17 at 22 39 03](https://private-user-images.githubusercontent.com/87159434/291104382-42d9d17d-9340-46a0-bbb3-d07587746af1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDQzODItNDJkOWQxN2QtOTM0MC00NmEwLWJiYjMtZDA3NTg3NzQ2YWYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiZTlkMzk3NDg2Yjc0NzA4YmZiZTlmN2RlMTU3OGJjYThiYjc1ZjRkMDQ1ZWI2MjliODRjNGNiZGFjZDQ2MjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pt563CkMPypq6H2MxmO1lIOjCbnNCRg1PQdMVz-Vaq0)
then the webserver (adding ssh & alb)
![Screen Shot 2023-12-17 at 22 43 56](https://private-user-images.githubusercontent.com/87159434/291104686-0f448603-68a4-459f-ad2c-8adb5640f45e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDQ2ODYtMGY0NDg2MDMtNjhhNC00NTlmLWFkMmMtOGFkYjU2NDBmNDVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5ZDFjMmM5NjBjMjk2YzRkMDExZjcyZWQ5NDM2ZWIyY2FlZmNiMTFlNmNlNzlkNzUzNTU3NDljYzk2YzRkNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MElpX67T_8SgRT-i6Mdw-gpLnEDXbW9WbPwkHznpCWM)
and for the database (port 3306 for mysql)
![Screen Shot 2023-12-17 at 22 47 10](https://private-user-images.githubusercontent.com/87159434/291104871-c027175e-cc4b-4c2a-9094-adf9abe86732.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDQ4NzEtYzAyNzE3NWUtY2M0Yi00YzJhLTkwOTQtYWRmOWFiZTg2NzMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjMjg1NDJmNzY2ODQ2YTJmNWVhYTgyNGJjNmQ1MjE3OTFhNzRjMTE5NjlmMDBkZGQ4NDI2MjlmZDFiYjU5ZTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ljt-OmI0mje8xAIClN7kexpMeJ_XmVMp4wfdCT5KtAI)
first we need to create the subnet groups,in order to specify on which subnets we want our RDS database in
![Screen Shot 2023-12-17 at 23 43 08](https://private-user-images.githubusercontent.com/87159434/291107558-2759bbd1-73ec-4394-81e7-42dceb94faef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDU4MDgsIm5iZiI6MTcyNDE0NTUwOCwicGF0aCI6Ii84NzE1OTQzNC8yOTExMDc1NTgtMjc1OWJiZDEtNzNlYy00Mzk0LTgxZTctNDJkY2ViOTRmYWVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA5MTgyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRlYjRmNDAxNzhjYjM2NjUzNDhkZDVhZmFmM2E4YTJkYTE4MjNjZjBiNmFmNTdiM2JlMzQzNjkxMmZhNWMwNjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.a4KVWqz1uOew8gTLL3jNux_bRbuPVK6M8SyciVG0qPk)
now lets create the database (2long 4 screenshot)
engine - MySQL, Template - Dev/Test, Id - dev-rds-db, Instance configuration - db.t2.micro (free), VPC - dev_vpc, subnet group - db_subnets (the one we just created), security group(firewall) - db_security_group, Availability Zone - 1b, db name - app_db, pwd - rZpdQGf6QdKAYsE4iYf7 (lol)