{"id":3754,"date":"2024-02-27T19:45:07","date_gmt":"2024-02-27T19:45:07","guid":{"rendered":"https:\/\/code2deploy.com\/blog\/?p=3754"},"modified":"2024-02-27T20:15:15","modified_gmt":"2024-02-27T20:15:15","slug":"lamp-php-project-deployment-on-ec2","status":"publish","type":"post","link":"https:\/\/code2deploy.com\/blog\/lamp-php-project-deployment-on-ec2\/","title":{"rendered":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>&nbsp;VPC | IGW | NAT | ROUTE | RDS | Bash Scripting | ALB | Auto Scaling<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisite:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One VPC<\/li>\n\n\n\n<li>Two Public Subnets and One Private Subnet<\/li>\n\n\n\n<li>One Internet Gateway&nbsp;<\/li>\n\n\n\n<li>One Public Route<\/li>\n\n\n\n<li>One NAT&nbsp;<\/li>\n\n\n\n<li>One Private Route<\/li>\n\n\n\n<li>Create Application Instances by Auto-scaling<\/li>\n\n\n\n<li>One Database AWS-Server instance<\/li>\n\n\n\n<li>A PHP Project <strong>&nbsp;&nbsp;&nbsp;<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Project Roadmap:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VPC Create<\/li>\n\n\n\n<li>Subnet Create under the VPC&nbsp;<\/li>\n\n\n\n<li>Allow \u201cauto-assign public subnets\u201d \u00a0two Public-Subnets\u00a0<\/li>\n\n\n\n<li>IGW Create<\/li>\n\n\n\n<li>Public Route create&nbsp;&nbsp;<\/li>\n\n\n\n<li>NAT Create<\/li>\n\n\n\n<li>Private Route Create&nbsp;&nbsp;<\/li>\n\n\n\n<li>Database Server(RDS) Conf&nbsp;<\/li>\n\n\n\n<li>Instance Create by Auto Scaling<\/li>\n\n\n\n<li>Application Servers Conf and Project Deployment by User Data and Launch Template in auto-scaling<\/li>\n\n\n\n<li>ALB Deployment inside Auto Scaling<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-01:<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create a VPC:-&nbsp;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select Zone<\/li>\n\n\n\n<li>Click on the Service&nbsp;<\/li>\n\n\n\n<li>Click on the&nbsp; VPC&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/NNC_8_W_zgA-yCpBBI_L3UKn35BZSSBod14XwMOUWtLA5-SvcJlRcVvc60oseW2_Bc3PRYa_D153TRDbOYql1PSOFnniXciE799-X3-fJkAnUqZ8Jr5l7Bdnzpagi7__MjIWiI3acicZTEKp3eR6VQ\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Click on the <strong>Your VPCs<\/strong><\/li>\n\n\n\n<li>Click on the <strong>Create VPC<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/Un-gfrWdv_wmpnKXrkh2S7Fmv18NGhVuV32END6oUkQvRsOc80ZfIT0IPn-zCQffkHPywTQ3piMsTKGe7dPKc-UP_qgJpfm7TO8SuIvzd8JyRaHlBjcibAf5rPkk2vPSsNQj9wdr7cfg17UvOAkC0g\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Enter the <strong>VPC Name<\/strong> (LAMP-VPC)<\/li>\n\n\n\n<li>Enter the <strong>VPC CIDR block<\/strong> (CIDR Block will be (10.0.0.0\/16)<\/li>\n\n\n\n<li>Select the <strong>No IPv6 CIDR block<\/strong> (as you will use IPv4)<\/li>\n\n\n\n<li>Select Default <strong>Tenancy info<\/strong>&nbsp;<\/li>\n\n\n\n<li>Then Click on the <strong>VPC<\/strong> <strong>Create <\/strong>Button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/DfWuJFrfEcurYgCZPBTbewDMfIFwSLGf0xsymOWVrVGKfj1iKQOKqO8obnX-IwzpxK5Fh-ncYH6ITc4_bv62GaZy16lxlalmmrHIT-RuZnJHI82t28TVUEVS_yq7NKa8YsZkXSIEiAoFRYc-tJtoCw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>===VPC Create Done ===<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">VPC successfully creation is done, now need to create <strong>three subnets<\/strong> (Two Public for <strong>APP-Server<\/strong> and One Private for <strong>DB-Server<\/strong>) under the newly created <strong>LAM-VPC<\/strong>&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-02:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Creation Three Subnets:-<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LAMP-APP-Public-Sub1 (10.0.1.0\/24) Zone-1<\/li>\n\n\n\n<li>LAMP-APP-Public-Sub2 (10.0.2.0\/24) Zone-2<\/li>\n\n\n\n<li>LAMP-DB-Private-Sub1 (10.0.3.0\/24)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Tow Public Subnet should be created in the tow availability zone as it\u2019s required for ELB<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click on the <strong>Subnet<\/strong> option<\/li>\n\n\n\n<li>Click on the <strong>Create Subnet<\/strong> Button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/LfHrItgm1ml0uqOMTDuujPGhhugnTEnM4tylNfCv56dsmLnDoJmdxe2VKCkaBhSwgbEUlUFNbcZA78u1b3-wMdWvQoyXlpbPEmk9Xew-_C6Ko3WEfOzYUVVFnRMh6TBwa5Qah2x5Ex1Hfo3G4D5XYw\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Select\/associate the newly created <strong>LAMP-VPC<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/oJ2uIvK2wPRuJPVzjEkfn7lzb5tLq8hQ2lTwGcr26HuXgMbjfVi4kM2nLU90cklRo6KGgSt5FHmCeHFM50XE9W_uWt4Vw6moNikR05ILMPyejPr1nxnAJvlmAcyYWFZca3I-Dk5vk5wzEI3xnFmdxA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Scroll down the page and follow the remaining steps&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;4. <\/strong>Enter your public subnet<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;5. <\/strong>Select Availability zone (it will be required for ELB)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;6. <\/strong>Type CIDR Block (Assign smaller block than VPC)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/fEoWRJNPwDTnWPabzTPrvTPrT7SKeQfFOJlIeQzyAwO8pTU1NRpHt_pNn--LSSEbRgXUQ0CADlsvHWoDeBTXzVhR-pKEOgJhg3dqwso_R7sVqcdOCbpz5bKZY7yAVzhDZ9MqRyzMHo3zGcZn7XgLDQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>7. <\/strong>Click on the <strong>Create Subnet<\/strong> Button&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/-YizkZk3txaATbjRFqnDJJAzjrcDls1EydS1TcM8aZlHJiU79WpRHWt_pTjERa2X96wZ77HUQzlBiA3WYYPukziv9mOdecH5Ypm1h31YWeM0JjWLYUhkeuo-8WVTseBVPpM3zl1_BJM9xY0GcuSUPA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Create <strong>Public Subnet-2<\/strong> in the same way and select another availability zone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>8.&nbsp; <\/strong>Select and<strong> <\/strong>Create <strong>Private Subnet-1<\/strong> in the same <strong>VPC<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/rkJx8GuKvD-QiNaQJ-ztlVAppv3RaqHKAp5sH5SDul_9Jb6YrnVEEXIq2QOJuzJlnQQWSj-zYm0-LEGZmWEQIrpo0F_rjQWNA68Ipx4n74I5BbSEgqZtvKOpBOGI4j7VFBJkBQPcHz4y7XbSmXNx0g\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>9.&nbsp; <\/strong>Enter your private subnet<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>10. <\/strong>Select Availability zone<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>11. <\/strong>Type CICD Block<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>12. <\/strong>Click on Submit Button<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/KncOaHHsL_PncZh1gA7x7fQF46BoDP2xCs5wkOFd6G99gXCFgR3t7gxtC4b_9WNWulnNijMbIpV2d8z5sdefw-oTLGFmAF_54-ihHA9xqKQpukN159Hvs9sBgimUnc1NSHUCWznJkSuc-EeNyfrfRg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>After Creating Public Subnets You Have to Enable Auto-Assign-IP.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go to <strong>Subnets<\/strong> interface and follow the following steps&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select <strong>Subnets<\/strong> Option<strong>&nbsp;<\/strong><\/li>\n\n\n\n<li>Select the <strong>Public-Subnet&nbsp;<\/strong><\/li>\n\n\n\n<li>Click on the <strong>Actions<\/strong> button and<strong> <\/strong>select <strong>Modify auto-assign IP settings&nbsp;&nbsp;&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/bz5B8jMhfd3SGtbpO4aXqu8gHyUgxPHNeO5V87BtrH7sj-kplGQMxKoyWMFpXXykzsjOV7hkl6dtXJBh3pcMJq8oHCTR8oUNiIvag8hH6_KVSPRYLfT5WY92mXFWqzoCsivrPP-dpED8QFsyaLzVMA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li><strong>Enable <\/strong>auto-assign public IPv4 address<\/li>\n\n\n\n<li>Click on the <strong>Save<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/-303yJ5XprWqGfyBul_eHq5Nx8sl_YaU5MbF2WJhiEcdTAuMK9UJlEOwKTnYUInrd9hu19cQxVFmZwUdjjOeu-cVmAgu_5wXvXotnTlAZbSDnKoTWGzuZ32hL3k4DA1PjWjpRhDDMBkA9_ZdIjZ-Vw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note: Enable the \u201cauto-assign public subnets\u201d in the same way.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>===Subnet Creation Done ===<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-03:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create IGW (Internet gateway) and attach to public Subnets:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click on the <strong>Internet gateways <\/strong>option&nbsp;<\/li>\n\n\n\n<li>Click on the <strong>Create Internet gateways<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/kgkZQ8O-3RiGcGqQcJQn5PdrZrxGvv4VNPcJKT6nGTAihxpN6_-lSCjfzq8px9tVuauSqaUWotuoFhz28CQyjdIoMtMiBM1yis7C0WivxR6hM2faGSWBoe658CEI3maGh4ky9GVKgmUY_5_DRgSAkg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Enter the IGW Name <strong>LAMP-IGW<\/strong>&nbsp;<\/li>\n\n\n\n<li>Click on the <strong>Create Internet gateways<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/h89PQp01duDuiYxjicL9WMbLMzYTAe2ifzRDYYFGgBAfqd0OudMBhhLedI0tGlv-lEoiNXrCGEfzocaAN9Yq2xx69zyUKjmwlv0m4bbP4b34YqKF6q4silDTsLFVJP5sWTx9kE1cd3TT6gbwRTuJFg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Click on the <strong>Action<\/strong> button&nbsp;<\/li>\n\n\n\n<li>Attached to the <strong>LAMP-VPC<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-04:<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create Public-Routable and Rule:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the<strong> Route Tables <\/strong>option<strong>&nbsp;<\/strong><\/li>\n\n\n\n<li>Click on the<strong> Create route table&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/96p1-cGjY5_51NE6GqO0Rq1cjKWazzXTuRTRsMz93AYmPgy2d-3aNJ6zle7KwdSjNGHrIuk3ur00E-JWLLdN3fDEllqjxFWjxzgOXBoiJp3qHbW0_aUHtV7R52nG9ioOa5nQ2sdG6sKWzAljurLtkA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Enter the Route table Name <strong>\u201cLAMP-Public-Routetable\u201d&nbsp;<\/strong><\/li>\n\n\n\n<li>Select the VPC<strong> \u201cLAMP-VPC\u201d<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/iB8MynToGYGWlejFEINTLFcl_KzO4wLx0NWOWYuT0d8oz8TpKN7YByZTolHIdPvUY67XJ9Mp9IeF4JeG0hKGR-LbAW0Ag0aQggI7vdSoTC43o9Uuz6El5-DsUCFKo2G8R5oUk6ANsqUM7YVKXdxp5Q\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Click on the<strong> Create route table<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/xNzAl1YbleuOGCeR6BhTE7SNAxQANlKUmHWa5L3knhj-Zc5IFWBbJpajI2EuCtlOd62pDCq5R_iPQt-yU131UbpMPDI-rpesBdEY-k8b0sMh7N1F7WIoYoRsgbc1MhqRnNr4jOUbf_BeEzmBIhXwqw\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Click on the <strong>Subnets Associate<\/strong> button&nbsp; from the<\/li>\n\n\n\n<li>Click on the <strong>&nbsp;Edit subnet associations<\/strong> button to associate&nbsp; <strong>\u201cLAMP-Public-RouteTable\u201d<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/KDYVfjzlRxWnMfnxLyN1AyfuTJnNm5_QKtK2tLVQckclOKKvtVUuaRxY3taerAdwlryBjvEpkTsY1GoHHfxA2HLBE6llbKRZBgn-xo46VbI1q_UllpCBzN0-hUlzqpmDSIkYI8AW7vLQvGQonD4lxA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\">\n<li>Select the<strong> \u201cLAMP-Application-Public-Sub\u201d<\/strong><\/li>\n\n\n\n<li>Click on the<strong> Save associations <\/strong>button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/qOX-Hpv8oGRRsyYLaC4IfWkQQEkrF28ETEW9f4k-S_qqiIEFg_97fMIPOych_ox178AeuAY-pg5nO__1u7A4GsNxjQnhvzUCt5izjL0V35_zpAQJnrruRwH3fDLNK1y3nsuuRAkc2UQuDueeZjt1ig\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\">\n<li>Click on the routing interface on the same page<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Add route rules(allow global access to anyone)<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"11\">\n<li>Click on the Edit routes&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/K9wMyn9di7tpcdTnFAqJoiETCNwg-3wewbkNBEC6Pnan211tAIpjRojUk4uf_gKlYJzhdzOMSK9NNFUc4Sfbvo_3kYgvoL5u3ww7kvYnSUpDUlpdqvN3vC_a_klByY9-o_5i50sz-e4peD9WEgnWrA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"12\">\n<li>Click on the <strong>Add route<\/strong> button&nbsp;<\/li>\n\n\n\n<li>Add newly created<strong> \u201cLAMP-IGW\u201d<\/strong><\/li>\n\n\n\n<li>Click on the Save changes&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/76FwQdGqz6BZZNRSvqMHGYH4bSDn3EPoJwyjyIkCeDmp9bidsViB6pw0JOi9un9rx00CW3ldUb5OIIBopPVB2JbBolltAQf_-MKp--q1MNAJyuY2s2WO2DO7rW5fquiTsijMJ5CUKvtHJ4TnOmtONw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-05:<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create NAT (<\/strong>to get the internet connection from the LAMP-DB-Private-Sub1<strong>):&nbsp;<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the <strong>NAT Gateways<\/strong> option&nbsp;<\/li>\n\n\n\n<li>Click on the <strong>Create NAT gateway<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/vSeUW_NOB0YeD4IjvhCF7yekE4LLbAHxWhF9Zgm8OTQN8kDXOYNW6KNRURWBeNngIzyFuvLz6jAZwBE3Ulhmh0n266Uoe-UOk_sA7spo04z6jKMLYCrrAvoyTY0JyxFjZF3jThS_pLdk7Pwms10bVQ\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Enter the NAT Name <strong>\u201cLAMP-NAT\u201d<\/strong><\/li>\n\n\n\n<li>Select the public subnet&nbsp; <strong>\u201cLAMP-APP-Public-Sub1\u201d<\/strong> as the public subnet is connected to the internet and we need to get access internet for the DB prerequisite installation&nbsp;<\/li>\n\n\n\n<li>Select <strong>Public<\/strong> Option&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/VBs4bkyAX-RP0-6ONTN5HTybN7GH--_voWmqtcYaMnACTALKewoLts2tmpTHtClRqgr5EZOX8hNIg382_mfmR9lx3T9AhPgeM7Di5F44AoaqCsJnu4F-5QoHqJHzTVmK2e93qfpQ5YM5hnMfPDrGXA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Create an Elastic IP Clicking by <strong>Allocate Elastic IP <\/strong>Button&nbsp;&nbsp;<\/li>\n\n\n\n<li>Click on the <strong>Create NAT gateway<\/strong>&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/AD02E-9djnkbdnDNdUgZz2VxSQcbZOMuF5cm3U9RLTozk0HACJnnfxqDZLzTkKAUD0bq41LP5zqLRalgxGhNfNZFD7az9qIjqQZopZE_B6I3UVRrsNf6Ozs2TKgIl6N4phcg0dLxknkvYUdJWVAnTg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-06:<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create a Private Route Table:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the Route Tables&nbsp;<\/li>\n\n\n\n<li>Click on the<strong> Create route table <\/strong>button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/deUIesOAAiHORSE_bw0Zten6nZjCVAhgh0Q02mleKw1sFXNpj40Sp3k28FC6idqNLAme3uvyOnoajKfWjosYEv65XXrJIsdxRPMEIFA_N3P8dpTibsc2pqPTilcclM5c40ju6CnviELSE82arG_bEg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Create with assign <strong>\u201cLAMP-Private-RouteTable\u201d<\/strong> Name<\/li>\n\n\n\n<li>Select the <strong>LAMP-VPC<\/strong><\/li>\n\n\n\n<li>Click on the <strong>Create route table&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/ic-cHdrh2VnNPnydsHk6ty2Wa1fcDLni65SP8S9tryKZIvwcVbjqXxUnxaswE54t9ZbbBcqWL51Q3CF7RsPeAAdd6zMz2QmooI-UeNeNAScGO4NLZ18-kSYi-0yYCCi1ijkZD913dAcyDjAF6re1Qw\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the newly created <strong>\u201cLAMP-Private-RouteTable\u201d&nbsp;<\/strong><\/li>\n\n\n\n<li>Click on the <strong>Subnet Associations <\/strong>button<\/li>\n\n\n\n<li>Click on the <strong>Edit subnet associations<\/strong> button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/YRhxQUM3_1990_eZOY1IMHe0-FcWD9xp5HeVHkr0OhsS1k_cc-BKSZWC08u0N02V8_qJxVF4ZGPHlXIHGK_Xn9KdG-TWHfRkVJycOs4BJvDZ_aP-a1h9Hno1_sVRP9GvFGybE8IjfMqKyRo9N0Mt0A\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Select the <strong>\u201cLAMP-DB-Private-Sub1\u201d<\/strong><\/li>\n\n\n\n<li>Click on the<strong> Save associations<\/strong> Button<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/EhT_xEZKFeTO8qx9JUt2J3ZjaYWcVbEhqJrNMrquNwj4ocNX80_fbsFRQ_kD5wrXX4LMghKKzDnAc79KKfRg4dbg3guh7gJ4GoEY7IC0X_IbMC5wO9r1dE_pJiZFR2o71UOVHKzSAPQWm7xp3BdB4g\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Click on the <strong>Routes<\/strong> button&nbsp;<\/li>\n\n\n\n<li>Then click on the <strong>Edit routes&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/gowht-nivUg_134x3dd1xGpixsfyxMPyRs8QFrmjdSL1P3v1sS-UBRVCKhbUu0YIoMpJKaCwZ2O0xQHfzmXyIjTcNGpTEdSpnJu5XkltEU7P8AxGQ6RoPHe5Az0ylt5av1srGuewZBNSDk2LXCOXGA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\">\n<li>Click on the<strong> Add route<\/strong> button&nbsp;<\/li>\n\n\n\n<li>Allow to any host and Select the \u201c<strong>LAMP-NAT\u201d<\/strong><\/li>\n\n\n\n<li>Click on the <strong>Save Changes <\/strong>button&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/7P9nKYpmUua5W3d1DvkjvoajDJ4k__bzzT-Oumd_F1_X6ZxLV3nmaVVZO7kdTvkCchWKHaapkT64V_KX_eIVz7ivwMgVIBu0uwoGBiMeZQ88j5B369riu7VCjf9md1s0QNLPouXynuVEchGgh5pOpA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>RDS<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Install and Configuration&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-7:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;RDS Prepare:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select Service&nbsp;<\/li>\n\n\n\n<li>Click on the RDS<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/OA4iXHtnJ375L_AKonVoqMtEhTk5Xwi0RJLIXT8gA9cdhuq4b8ZZKGK9RRoqDowNdunjZbH0Of4giQV3fOnSksIxY-mp29N629rARDdXQk441at8bxmwvN6YzctsRL1mrd9dnNHOFFTmzf0MN2AxlQ\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Click on the <strong>Create database&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/rM7qqh1HQWPol_unG5AKahiW_UnSp1yLaNsQA4_5qj3P7Ft2Tzl42Y40qW6qJ0q4iEFWCfDYrKtR5GpSjhoaPbTuDB4fKNPiAZttrLktxctguSbaDx8yRnXKIRY9DytSzImbO0deV1ZKMZnHf6mhAA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Select the standard create<\/li>\n\n\n\n<li>Select the <strong>MySQL<\/strong>&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/H5xc3Xa_Cg-COxBY8FH5biNcgOFaE3jXLTqZMDfNAaFqP32OanCAJ14F-cROxxOjsOmNPBxHU4diJMKpmKR_LuW280erth8v2hNhf6PArf4dbegtUjXqgGZWT_qHX9-5PIMGa9YINDrGsVsCouUC5g\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Select <strong>DB-Version<\/strong>&nbsp;<\/li>\n\n\n\n<li>Select the templates as per your requirement&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/lIysl-wvUE0q9SNUIcRVZidHswIjl4aeFSxH6HwH5P-Mp12jfPt9_fpsG5nyKk4scOYIpOrnGgjf2N_5GHjGWZ4rZCvbE0KLyBi7wEr2W1PUQ5_oVzHqCCKn5DmgxhewZ3G7ALL43jptkTxLdl5AxQ\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"8\">\n<li>Assign the <strong>DB instance identifier name&nbsp;<\/strong><\/li>\n\n\n\n<li>Assign the Database muster username&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/uQkGTkZiPE2azOFFBlEKJwagBIlLj2H9c-NaZbHhbSrZjK83gar5CQMYOYLk1kKWTqkjElp909jSlEOq4B3Xhoe533Dn5W29I7FLxNOF69DtyHZwDKO3AgTQTSBw3YqGXjvuiqaqDD_Zy6kfK7qvSg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"10\">\n<li>Assign the master user<strong> password&nbsp;<\/strong><\/li>\n\n\n\n<li>Select the instance DB Configuration&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/hsEytz2LEVClXn-CbSYETDF78PPm8XykiP0tW6ODKp_1Z27vXsxk9iCX_bY3iv8JCoH8Na6PVPdzEH8nS9lannrejJChVAPKky6T3X0kf1iAD9xaGnrUsxc0kQjFCNV9ojkQ3rK-gYjSYXkqWffcjA\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"12\">\n<li>Select the storage&nbsp;<\/li>\n\n\n\n<li>Allocate the storage capacity <strong>(minimum size 20GB)<\/strong><\/li>\n\n\n\n<li>No need to Enable auto-scaling storage as we prepare it for practice purpose&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/46L_3TEpkQUwJ5yRc2hSbfpTulDjdgcisFNrlVW2TNT8otvtYCeariHFWSCCFNWIGwPDa7AifaQjEQnM7T4qSXixcWw1DH75TpTMNes_QGtpCHr31uM10Fs6syQaqZ_1x_5XJXH72RlYaqF2yEJDWg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"15\">\n<li>Select the <strong>LAMP-VPC<\/strong>&nbsp;<\/li>\n\n\n\n<li>No need to select a subnet group&nbsp;<\/li>\n\n\n\n<li>No need to select subnet groups <strong>as are allocated it in the private subnet&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/tZd0dIz7WWxJqGmGcWD964qz1ZeYnlwUrVrMLoKj9aGvXp-jTRmcA2hYSrFa21hxF5ph1W0VNVQk7Pvypy73Um-kLRai7c_IFCOfEQw4U3hRpXOPmsqCN4TJjxAHf5gDHCHQng7jwPUGfUaODUAkPg\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"18\">\n<li>Select the Security group&nbsp;<\/li>\n\n\n\n<li>Select an <strong>availability zone<\/strong>&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/sQkUs60nSfKfNuZ20dSmqFw_nVMDx9Q7OdcYh6ngl-sOSCVRQYUeFVE9VByBZELNSt7FKCNtMyXQ6KOfCW0Zm5j8qICfCX3aSpDCj8MYkHjpmORsXtQpkbb0ZgcVruKaDZFapIgIDQok16rv50O6bw\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"20\">\n<li>Assign the LAMP-Project DatabaseName <strong>mlb2018<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/7lUDNXkqEeg3Ut-1ytQr5I5LF5oRShI29QHIjCgLwg7BYci5szj6cF_l913L7d5G6JBD5ba2QbfAwjdYRM95aeQh_bqJc0K1m-GW9o2AXi_Hq5WWQXTkC1QByTbqNtkNOwgGq3tEe9tAcLr3VIzS9Q\" alt=\"\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"21\">\n<li>Click on the<strong> Create Database <\/strong>button <strong>\u00a0<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>After successfully launching the RDS, collect the <\/strong><strong>RDS endpoint URL<\/strong><strong> to login into the RDS and&nbsp; Connect to the application server.&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To log in\/database import to the RDS Server, you have to install <strong>MySQL Client<\/strong> in your Linux terminal. Then import the Project Database into the <strong>mlb2018<\/strong> database<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-A:<\/strong> Install MySQL Client in any instance Terminal&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ sudo apt install mysql-client-core-8.0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-B: <\/strong>Clone the project to get the database\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>$ git <\/strong><strong>clone<\/strong><strong> <\/strong><strong>https<\/strong><strong>:\/\/github.com\/vijaythapa333\/phpmultilingualblog.git<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-C:<\/strong><strong> <\/strong>install unrar package to unrar the project database&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ sudo apt install unrar<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-D:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate into the newly cloned project directory to unrar the database.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ cd phpmultilingualblog\/<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-E:<\/strong>unrar the project database to import&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ sudo unrar e mlb2018.rar<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-F:<\/strong><strong> <\/strong>Log in and import the database using the following command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>(mysql -u [<\/strong>DB_UserName<strong>] -p -h [<\/strong>RDS-EndPoint-URL<strong>] -D [<\/strong>DB_Name<strong>] [<\/strong>DB_Name<strong>]<\/strong><strong> &lt; mlb2018.sql<\/strong><strong>)&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ mysql -u blog_user -p -h lamp-db.cio4rlhqebhe.us-east-2.rds.amazonaws.com -D mlb2018 &lt; mlb2018.sql<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-08:<\/strong><strong>&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Let\u2019s create Instances for LAMP-Application by Auto Scaling.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are two stages<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Launch Template&nbsp;<\/li>\n\n\n\n<li>Auto Scaling Group<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Create Launch template for Auto Scaling Groups<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Launch Templates from EC2 Dashboard\u2019s side menu.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click on Launch Templates<\/li>\n\n\n\n<li>Click on Create launch template<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/W7L-dNEMvcMAy8PhrcIhvvTMiXnsjZoiE8SOoVTUpHVKSqqHs82rNCFfMed4FLYqKFpZTnBtNdDcryBFBqnClpJkqnPF2rTEtfk_k2aM_WfYBASH1IC0vYnO7fpBNe0StPpiI5Vb-9exokJjJPbiUg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Create launch template\u2019s steps.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Launch template name: <strong>LAMP-Template<\/strong><\/li>\n\n\n\n<li>Template version description: <strong>LAMP-Projects<\/strong><\/li>\n\n\n\n<li><strong>Enable<\/strong>: Auto Scaling guidance<\/li>\n\n\n\n<li>Select: <strong>Ubuntu server 20.04 TLS<\/strong><\/li>\n\n\n\n<li>Select Instance type: <strong>t2.micro<\/strong><\/li>\n\n\n\n<li>Select <strong>Key pair<\/strong> name<\/li>\n\n\n\n<li>Select <strong>Networking platform<\/strong><\/li>\n\n\n\n<li>Select a <strong>Security group<\/strong><\/li>\n\n\n\n<li>Customize storage (optional)<\/li>\n\n\n\n<li>Give <strong>User data<\/strong><\/li>\n\n\n\n<li>Click on Create launch <strong>template button<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/Qz9BOQMfwKdscIRZ6lV2yIKCZoI-t2FmU-vaqEBaUJ5gTFh-KyUwh4OkQ63AjoT4Xn51iYSe1XLdsW4lqhdhWyxgem6OizPCGzz-ZRmw-9nGjkj2ulYGl6A4Z_myTpCDPw_z6pyo_9F1L1bAQOtYFg\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/WswktPpo6LrhsEvdM5t0b-sap_mGwAmdWDYC8VO-72Ex8GGEFnWr5aazd5-10AyZ0zjWtQZH8Zxcl3xsPmyeI07IlLH8DO5dqnL1amDVnoTit7HgsoazYdDfgFkXnIC2lEHLycv6XDgIRNrcPGyVgw\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/imFuj3AEMC2WPxtQOcBjGwQBb0-ti3yIco_OetvvkyZZRk09704BLYXiHBfPz6L-MRvjoQofImeEfJEO1nP8f5CCW-jEDw9uIv7ysNjxepb6KnKQtt2-i34qf8Mz9Ea1bEukz9UYylwrXvB0R_QLmA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Under Advanced Details&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>UserData:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>#!\/bin\/bash<br><br>sudo apt update<br>sudo apt install -y lamp-server^<br>git clone https:\/\/github.com\/vijaythapa333\/phpmultilingualblog.git<br>cd phpmultilingualblog\/admin\/config\/<br>export INSIP=&#8221;http:\/\/$(curl icanhazip.com)\/&#8221;<br>export TMPURL=$(echo $INSIP | sed &#8216;s\/\\\/\/\\\\\\\/\/g&#8217;)<br>export OLDURL=$(echo &#8220;http:\/\/localhost:8080\/phpmultilingualblog\/&#8221; | sed &#8216;s\/\\\/\/\\\\\\\/\/g&#8217;)<br>sudo sed -i &#8220;s\/$OLDURL\/$TMPURL\/g&#8221; constants.php<br>sudo sed -i &#8220;s\/localhost\/DBURL\/g&#8221; constants.php<br>export PASSWORD=&#8221;&#8216;password'&#8221;<br>sudo sed -i &#8220;s\/&#8221;\/$PASSWORD\/g&#8221; constants.php<br>sudo sed -i &#8216;s\/root\/blog_user\/g&#8217; constants.php<br>cat constants.php<br>sudo cp -r ..\/..\/. \/var\/www\/html\/<br>sudo rm -rf \/var\/www\/html\/index.htmlsudo systemctl restart apache2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After successfully creating you\u2019ll get a Success alert. And you can click on View launch templates.launc<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/FxTV8CX0LRe9yqJLk8pJOFyXRR7yj2XKcqPWuTdmKYIET_SMGRyu_wMByufD01NTskPUP40Zp03RsNlQuh6NBxwHMe6XxGZ0S-467YNZXqTtApAuBI3IgmpSh8oXDteS2KGLkM_V0fn1FZsYq4euGQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">h telat<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/hXkras6dKyuEZUMY3Xws45hv2gYC55w5kzvC4O-fq1PYqVV0hrMioNqFC77P1yhFa6tMmUO5O451gGco5vBROmcoCWWawSKChORNhSY-J5cBx4BQsKeRR2kTmn_edKtdIWmursRFegenTt2IDsk0PA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create Auto Scaling Groups<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An Auto Scaling group contains a collection of Amazon EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management. &#8230; It maintains this number of instances by performing periodic health checks on the instances in the group.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To <strong>create an Auto Scaling Group<\/strong> follow the steps below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click on Auto Scaling Groups from the EC2 Dashboard menu and then click on Create an Auto Scaling group button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/hIcJj8ET7fVVKr-YdEiqJR_KvWmlD1G6S3lqD7hcMsdzXDm_Lnn9nu5GoPLCz1OELZQxB5RekdpTNJZ_7e_tdJU5O3v_mYcagRMiHC0Ej1ZtSRkPjYVGcEO8nMQaZi2xEXF89VS5O08mTXGOTnVxYw\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step-<strong>1:<\/strong> Choose launch template or configuration. Example below,<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Auto Scaling group name: <strong>Lamp-asg<\/strong><\/li>\n\n\n\n<li>Select a Launch template<\/li>\n\n\n\n<li>Click on the Next button<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/9WbbHWKNLVXosxjUnbswElol_0spUQgoqqbP4a6bQ51GAHiqyhSLgRv1yUsQvE8L7PEgtpUHHUY1yFNJ_Vc303RtNhNHHAQwu3hlp3b8vduaOO88AXLIEYvIAPC18HsOSaCMrMfU0-BMm_UbiLnHhQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;tg<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/m6uPeVeMAPoLin3DBYUIuexclpexSjGyzB60nIJm-wttdz3ACTs-H5XxDZtVxEdUqUcaThEb74-kOZnGji72Hiipq68t30nc9WRjbDd2WNH1PimmQgBrcKyXR22vf-kAcYLuRaKpTTrummIA7C_2Kg\" width=\"818\" height=\"714\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-2:<\/strong> Configure settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Instance purchase options: Adhere to launch template<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Select vpc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Select at least 2 (two) subnet<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">the purposes of automatic scaling and management. &#8230; It maintains this number of inst<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/jj7XAmgTeT_Xoy2BqMcq53yHZAr9bxDTVCFlWU5f7nnzmRFFrd5RbcSZQKYrNrW-3j60qCYauk0yoTX0nu_ZegpKq6MMmU61AsOk5p_1oVAI8b-JLH6qjBymRkSucw0R0K8Oo2PPE8knvZSxiSsk6w\" width=\"834\" height=\"557\">ances by performing periodic health checks on&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">the instances in the group.<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/fK4WOwuOgTOoPZPokGpZknm9wDmf9zVyEmz-BZBImr8l4CaJ4LBLgD1Fe87v5XYOOEA3-uOhPpWtBQ9jf33F-_fv8Fu7m5tnbw-NGhVBvcGxDaJIVyfg3s_aNXtgTSiP9FcFqLvrtIa9R59gq2XNkg\" width=\"806\" height=\"351\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-3:<\/strong> Configure advanced options.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Load balancing: Attach to a new load balancer<\/li>\n\n\n\n<li>Load Balancer Name: Give a name.<\/li>\n\n\n\n<li>Health checks: Enable ELB<\/li>\n\n\n\n<li>Health check grace period: 300 seconds<\/li>\n\n\n\n<li>Click on Next button<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/RKjqCAAmwun02ILzpFlqEulMp1fiQA9Uao6VJgIsuMjKfQsEY2ywoSrof5Bo0P6OUS-SnmG6wB3IgQWeB3tQUwjtgy1QlxioSB-wAy8GT4EUSb3xOiy8hM-riAWPjyXX-HWaBlazl2zE1zDYu4jDeQ\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/UiyqQZOVcZUyf2xmKAwvbM3EI5URc1VAJyxGjTBWpDd30OARnqwa9BmBS2UqBTm5DsB0LGCnRWVo60GzKnIyT_2S7ROmLvJUNk5ymWXi_RxzvVbyCMX1V9TSSoLCgsc8S484i31OxXGhxJRZNEpnPw\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/ucWWQck5QcJqoFUAyDCI7G9PnR1hTbUrkNuzRDByoSjk7aAWyu2ZHiFRbem_ia5PilE-3BK0KxErFVUgZsIHVBE-SCCJdIPeyAtmV-mVqJSNOfp7Lr2H4uo6Er2sP5a_hSYgeRJHZSzqt463iG49Cw\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/FLAc4gNT5ink5rYkTN4Prk6Z3E-Et_dLOpFBxxlPBE4gwG-T09XHog8bdWgChA4IwIeM6JXjrPp7Ot2ZSeNfoZROSGN6euU53ExX_g42DeIbDmwCJsNiD9eUdGtuH7QsgYCGgSfhRLe61RlrDCxyig\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Click on next&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/-twhN_AsJ7YMwMPUdsMIFkbBNrKMyg0RHaA7Ax7pR3obyu9YRcCQ-XojujB0qjPDeOAYUk9Y04ncz7NHrosAG0J1-qLu348VlpDgl5c-xAD2fRGHxd_SBoQTGVBoxPI2SlTKjG4Y9FKgWtquzZoPyg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;ff<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To&nbsp; Configure an Auto Scaling group size and scaling policies follow the steps below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Group size, Desired capacity: 2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Minimum capacity: 1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Maximum capacity: 3<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Scaling policies: None<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. Enable instance scale-in protection: Enable<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6. Click on Next button<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/-mA_FUb3_WkO8Etd8VjBrjej24nUcpS9I6xQ33C07DEtPl-XvQXUfATo9z-jA9TKx7OfU8SqrWTx8f9D8DFoDzQFFQeiIoLUfjQoUUcRnJR1yR8QRFPTTwokNHSPk8D_2xmj_c-aPsX8UsW-OaQNPQ\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/86BPG-jzRw577v81Nd8C6oY1HsJ_NwYWv9LdfyaMy-aNjp3Nby5xNre3J8KS7ZbIX3x-uXTlUB6LnmINOAvBCeZcOZJH7UyS4xQ22HhmmKf8YFIiSXU-liSfAh9lq4B_e69e5ldL09uVPNRhu-FSDg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-5:<\/strong> Add notifications (Optional), add or Click on Next button.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/3Bg1rIkXFGKHUETf0luCp-Exdf-YMcAUQpDjE6RjYP3WYNQ_zgADL7d3-1BSpJ-mB-GY2j8RDhuuB0rO1NyYEKUatKDscXl6ICB2i4QgSt0FK8YAu7Y3D0ni8T9A3imh848jB6nVcF3nnYOy8hB5wQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-6:<\/strong> Add Tag(Optional).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Key: Name<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Value: Lamp-asg<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Click on the Next button<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/WUJfRvH9er6o2Nwsyd6su6V5U1_QWxKMZ8YZxfiympCg1aSOpZLO3tl70-eiAzpvg05v0J1b0GZcPX5rkimNZc4KridML-bbuVfBdwGYfqy_Rh9CsygtKfVmOJCkxf2y_xkihDd30tfj87MmHULJEA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step-7:<\/strong> Review and click on Create Auto Scaling group<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/kr-2YpiRlm5uU9VZI55k6U3pc9_YoofXUnQJMFsBuAqf3_hqhOfO_1H1WqutCfCTcalaXz01-3fLyHZ5uQVv91iTuUAX5rjWh7iMfQgc8WSjRf8puQTjFHpq2-EteIMf1Fj6zHc8Wz3UxU6jDSbR5w\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After successfully creating it, you&#8217;ll get a success alert.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/3bBQB1A885EjgPyqMUJDz7UcItTRpav9rnwldDJugr7W6Ft625SRCtRrMiw-33zG9v8Py_cir3pQR5N6jJcGpmxdNCPlDpF6SL_V48d7ZVj9CYiV3qs-sbGNpL2FwXgdAGL3QwKtevlQ-XLpJG_f-w\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>View Summary&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Click on Auto Scaling Groups from the EC2 Dashboard side menu.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Select targeted Group&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Select the Activity tab and scroll down to view the summary.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/eaCSolGSB4NRkxRPCYG-ZnSIopvJm7GhEIY0W4gsRYPIjKLUs9ePKxY8qvKcH2UJboe8567KjUhTTpe5voM7hR-u_eYp3i7fJ4r8zhVWJWukg1-06ToSFn5u4BU80c8ZhacW0yZ0MeplKkvfsFLeiw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The instance is created with the configurations that we have set, <strong>ALB<\/strong> will also be created.<br>Browse the <strong>DNS<\/strong> of <strong>LB<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/0v8SaM2o27Wk7cogkliwKSwGJf9mhdOdQP_tckS2_E_L-4YFc8g1UBr1182yBj7p5jssjyF5ymcd4QK6FHNfT2tJspEdUHEGEkP1tuyGHnmaOzKwWKeW-veGWPgauGyMZFpQlRag9vmN1wX3IltS6g\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>===Tourblshooting on Failur===<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Root points to dig down the failure cause:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Auto Public IP Enable or not&nbsp;<\/li>\n\n\n\n<li>Subnet, IGW \/ NAT, and Route associated or not&nbsp;<\/li>\n\n\n\n<li>Security Group desired traffic allowed or not&nbsp;<\/li>\n\n\n\n<li>Cloud Instance Log checking on the fly<\/li>\n\n\n\n<li>Template Userdata checking and version update with re-apply<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Way to Enable Auto-assign Public IP<\/strong><strong>&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Select the Subnet <strong>&gt;<\/strong> Click on the Action Button <strong>&gt;<\/strong> Modify auto-assign IP settings<strong> &gt;<\/strong> Enable auto-assign public IPv4 address<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li><strong>Way to check Subnets, IGW\/NAT, and Route association<\/strong><strong>&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the IGW to VPC Associated or not<\/li>\n\n\n\n<li>Check the RouteTables to Subnets Associated or not&nbsp;<\/li>\n\n\n\n<li>Check the Route to IGW allowed or not&nbsp;<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li><strong>Way to check security group<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to Security group&nbsp;<\/li>\n\n\n\n<li>Select the newly created Security group which you have created under the VPC&nbsp;<\/li>\n\n\n\n<li>Check your desired traffic is allowed or not&nbsp;<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li><strong>Way to check running instance log or behavior<\/strong><strong>&nbsp;<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">There are two ways, one way is from AWS Management Console and another way is to log into the instance terminal.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the desired <strong>instance<\/strong> &gt; click on the <strong>Action Button<\/strong> &gt; Click on the <strong>Monitor and Troubleshoot<\/strong> &gt; Click on the <strong>Get System Log<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/5osBpoyV-crswyLMTeliYtxPgjT5mceOwM24IXLLHHbZWtEhA0bP_AjqiwKKx2KSYgs2yEzYl1zgSmkrlEnKsnZWMu3pAnLsAGAG3HgnmhE6GKRj21vJkyjo0sWDyjXiMyQ37BDJvlug6gAk-Q19EA\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log-In into the Instance<strong> terminal &gt; <\/strong>cd <strong>\/var\/log&nbsp; &gt; <\/strong>tail -f <strong>cloud-init-output.log <\/strong>(to see running installation process)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To see full log &gt; cat <strong>cloud-init-output.log<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li><strong>Way to edit template Userdata checking and version update with re-use<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the auto-scaling group&nbsp;<\/li>\n\n\n\n<li>Select the auto-scaling group&nbsp;<\/li>\n\n\n\n<li>Go to Details Tab&nbsp;<\/li>\n\n\n\n<li>Go to the launch template section&nbsp;<\/li>\n\n\n\n<li>Click on the template name&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/-4eboDlv-Pqa_JXKAqqe1WMbiN234MxHan_SvGk9iICuZX5N5o9HFJ5zcrsicZY7yDotLdWFrG5TPcoVvXlJKAfQ5JWYYIRSKacgk-4r8yjZAFtWFYW88ybsujlocl1QLS6WHx2qwuVP9xqNx5HYsw\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Again select the template&nbsp;<\/li>\n\n\n\n<li>Click on the action button&nbsp;<\/li>\n\n\n\n<li>Click on the modify template(Create new version)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/08BknEj8R4p5f5k-3oW50p7fgYWy1O5ONOTTc9G5o9_ZfBqAkZ25-QaUg7VvBYQgMCd5puR-S4ElwEQUk8PLtLQdQ0eu0RI7q_kguuwpn4q8CVUqK9hQxL7scz6wQhgby97yDYuWM8dC--O0Zu71Yg\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Assign the new modification version name<\/li>\n\n\n\n<li>And edit the UserData as per your findings&nbsp;<\/li>\n\n\n\n<li>Click on the<strong> create template version<\/strong>&nbsp;<\/li>\n\n\n\n<li>Then go back to the autoscaling-management console and click on the <strong>Edit<\/strong> button and select the<strong> latest template version<\/strong>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/P1Zn58NnIfsPxf8sNskiG6BhWEKg5CCh5-EKKeI2AuKgXSrv_eMGqoaKR3_id4VVN9D2xezcQzBuyYuXEt_E1QKRwBoU37NKfCpbzFM88S_gEIC5roj1oKchLgKjInDnQ5tzdeo-f8fljPdPTSzXNQ\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Select the Latest version<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/ocfvMtbrkukapsFttvUEcMCKCJiUSMlL1pKbaTbV8wsm_NXMMddvmqzSBpLf3PLQrmCxWRiCL3eoCI41rCLNxTMbHV72JuSvTc718tFUK6jM0mvua98wddkq0Ri9MCTkrN09g81nNcsoEZw23fjKfg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then click on the <strong>update<\/strong> button.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that, you have to refresh the instance from the following interface.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the Autoscaling group&nbsp;<\/li>\n\n\n\n<li>Click on the <strong>Instance refresh<\/strong> button<\/li>\n\n\n\n<li>Click on the <strong>start<\/strong> button&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-us.googleusercontent.com\/fOkqMW7CHrXTFNwnONc0ArxrbH_k4N9r2AktESwIiH1Zpx3T0OXMmiDqZi-eeqy1crcXI3KnDDQaGPf9bbkXz-B1Gg8l3vekr1AD7NzfWb6KCfdheCus1y4ll3Q05q_EeUNUHmfgo4Uaa-ZSvANudA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>===THE END===<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;VPC | IGW | NAT | ROUTE | RDS | Bash Scripting | ALB | Auto Scaling Prerequisite: Project Roadmap: Step-01:&nbsp; Create a VPC:-&nbsp; ===VPC Create Done === VPC successfully creation is done, now need to create three subnets (Two Public for APP-Server and One Private for DB-Server) under the newly created LAM-VPC&nbsp; Step-02:&nbsp; Creation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3755,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87,104,174,121,166,22],"tags":[205,206,198,204,201,196,202,197,203,199],"class_list":["post-3754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws","category-ec2","category-lamp-stack","category-monolithic","category-rds-mysql","category-web-hositing","tag-application-loadbalancer","tag-auto-scaling","tag-aws-ec2-instance","tag-bash-script","tag-igw","tag-lamp-demo-prject","tag-nat","tag-php-project","tag-route-table","tag-vpc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com\" \/>\n<meta property=\"og:description\" content=\"&nbsp;VPC | IGW | NAT | ROUTE | RDS | Bash Scripting | ALB | Auto Scaling Prerequisite: Project Roadmap: Step-01:&nbsp; Create a VPC:-&nbsp; ===VPC Create Done === VPC successfully creation is done, now need to create three subnets (Two Public for APP-Server and One Private for DB-Server) under the newly created LAM-VPC&nbsp; Step-02:&nbsp; Creation [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/\" \/>\n<meta property=\"og:site_name\" content=\"code2deploy.com\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-27T19:45:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-27T20:15:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.code2deploy.com\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"677\" \/>\n\t<meta property=\"og:image:height\" content=\"254\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"enam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"enam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"22 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/\"},\"author\":{\"name\":\"enam\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"headline\":\"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling\",\"datePublished\":\"2024-02-27T19:45:07+00:00\",\"dateModified\":\"2024-02-27T20:15:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/\"},\"wordCount\":1946,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/LAMP-Stack-Deployment-On-AWS-EC2.png\",\"keywords\":[\"Application LoadBalancer\",\"Auto Scaling\",\"AWS EC2 Instance\",\"Bash Script\",\"IGW\",\"LAMP Demo prject\",\"NAT\",\"PHP-Project\",\"Route table\",\"VPC\"],\"articleSection\":[\"AWS\",\"EC2 Instance\",\"LAMP Stack\",\"Monolithic\",\"RDS MySQL\",\"Web Hositing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/\",\"url\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/\",\"name\":\"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/LAMP-Stack-Deployment-On-AWS-EC2.png\",\"datePublished\":\"2024-02-27T19:45:07+00:00\",\"dateModified\":\"2024-02-27T20:15:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/LAMP-Stack-Deployment-On-AWS-EC2.png\",\"contentUrl\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/LAMP-Stack-Deployment-On-AWS-EC2.png\",\"width\":677,\"height\":254,\"caption\":\"LAMP-Stack Deployment on AWS EC2\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.code2deploy.com\\\/lamp-php-project-deployment-on-ec2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/\",\"name\":\"code2deploy.com\\\/blog\",\"description\":\"TechOps\",\"publisher\":{\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/#\\\/schema\\\/person\\\/e46930c19b999a87f12566fa8357481b\",\"name\":\"enam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\",\"caption\":\"enam\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/code2deploy.com\\\/blog\"],\"url\":\"https:\\\/\\\/code2deploy.com\\\/blog\\\/author\\\/enam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/","og_locale":"en_US","og_type":"article","og_title":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com","og_description":"&nbsp;VPC | IGW | NAT | ROUTE | RDS | Bash Scripting | ALB | Auto Scaling Prerequisite: Project Roadmap: Step-01:&nbsp; Create a VPC:-&nbsp; ===VPC Create Done === VPC successfully creation is done, now need to create three subnets (Two Public for APP-Server and One Private for DB-Server) under the newly created LAM-VPC&nbsp; Step-02:&nbsp; Creation [&hellip;]","og_url":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/","og_site_name":"code2deploy.com","article_published_time":"2024-02-27T19:45:07+00:00","article_modified_time":"2024-02-27T20:15:15+00:00","og_image":[{"width":677,"height":254,"url":"https:\/\/blog.code2deploy.com\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png","type":"image\/png"}],"author":"enam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"enam","Est. reading time":"22 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#article","isPartOf":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/"},"author":{"name":"enam","@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"headline":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling","datePublished":"2024-02-27T19:45:07+00:00","dateModified":"2024-02-27T20:15:15+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/"},"wordCount":1946,"commentCount":0,"publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"image":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#primaryimage"},"thumbnailUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png","keywords":["Application LoadBalancer","Auto Scaling","AWS EC2 Instance","Bash Script","IGW","LAMP Demo prject","NAT","PHP-Project","Route table","VPC"],"articleSection":["AWS","EC2 Instance","LAMP Stack","Monolithic","RDS MySQL","Web Hositing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/","url":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/","name":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling - code2deploy.com","isPartOf":{"@id":"https:\/\/code2deploy.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#primaryimage"},"image":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#primaryimage"},"thumbnailUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png","datePublished":"2024-02-27T19:45:07+00:00","dateModified":"2024-02-27T20:15:15+00:00","breadcrumb":{"@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#primaryimage","url":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png","contentUrl":"https:\/\/code2deploy.com\/blog\/wp-content\/uploads\/2024\/02\/LAMP-Stack-Deployment-On-AWS-EC2.png","width":677,"height":254,"caption":"LAMP-Stack Deployment on AWS EC2"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.code2deploy.com\/lamp-php-project-deployment-on-ec2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/code2deploy.com\/blog\/"},{"@type":"ListItem","position":2,"name":"\u00a0LAMP PHP PROJECT Deployment On VPC + EC2 + RDS + ALB + Autoscaling"}]},{"@type":"WebSite","@id":"https:\/\/code2deploy.com\/blog\/#website","url":"https:\/\/code2deploy.com\/blog\/","name":"code2deploy.com\/blog","description":"TechOps","publisher":{"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/code2deploy.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/code2deploy.com\/blog\/#\/schema\/person\/e46930c19b999a87f12566fa8357481b","name":"enam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g","caption":"enam"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d864e2f082f4499f8f1b33f004ec166eea77b9e94738553b120b6dca2410f203?s=96&d=mm&r=g"},"sameAs":["https:\/\/code2deploy.com\/blog"],"url":"https:\/\/code2deploy.com\/blog\/author\/enam\/"}]}},"_links":{"self":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/comments?post=3754"}],"version-history":[{"count":2,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3754\/revisions"}],"predecessor-version":[{"id":3757,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/posts\/3754\/revisions\/3757"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/media\/3755"}],"wp:attachment":[{"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/media?parent=3754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/categories?post=3754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code2deploy.com\/blog\/wp-json\/wp\/v2\/tags?post=3754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}