How to deploy a Laravel app on AWS EC2? (Part 1)

kallol pratim
Jul 27, 2017 · 3 min read
source: Google

Configurer AWS EC2

Login to AWS console. Click on the drop-down link services and then select EC2. It will redirect you to the EC2 dashboard.

Now click on the button Launch Instance and it will redirect you to a new page, where you can choose an AMI among various HVM (Hardware-assisted Virtual Machine). Personally, I prefer the Ubuntu server, but you can select any HVM from various community AMIs. If you choose a fresh one then you have to configure everything to deploy a web app but if you go for community AMIs then you will get a well configured HVM.

After choosing an HVM, you have to choose an instance type of the selected HVM. Instances are virtual servers that can run applications. They have varying combinations of CPU, memory, storage, and networking capacity, and give you the flexibility to choose the appropriate mix of resources for your applications. Learn more

Next you have to assign security group for your Instance.

Add the rules mentioned on the above image to your security group. Learn more about security group.

And here you go!!, your EC2 instance is configured

Add Key pair to your EC2 Instance

Now, look at the sidebar of your EC2 control panel, under the group Network and security click on Key Pairs. The key pair gives you permission to access the server from your local terminal. Click on the button create key pair give a name to your key pair and click on create. A .pem file will be downloaded automatically. Store the file safely on your computer.

Connect to the EC2 Instance

Now again click on Instances and you will see the entry of that Instance you created.Select the instance and click Connect. You will see a many ways to connect to the instance. If you want to connect it to your terminal run this command:

`ssh -i “name_of_your_key_file.pem” ubuntu@ec2–your-instance-public-ip-address.ap-region_name.compute.amazonaws.com`

Bazingaaaaaa!!. Your server is ready.

I Will write about server configuration and install a laravel app on the instance on the 2nd part of this article.

kallol pratim

Written by

Design, code and things in between

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade