+ All Categories
Home > Technology > How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

Date post: 20-Jan-2017
Category:
Upload: aleksandar-nenov
View: 2,013 times
Download: 3 times
Share this document with a friend
37
[email protected] | www.cloudwebops.com phone: +381 (0) 66 398 398 | skype: cloudwebops HQ: Vojvodjanskih brigada 28, Novi Sad, SERBIA AWS Standard Consulting Partner APN ID: 490243 How to Deploy Laravel 5 on Elastic Beanstalk CLOUDWEBOPS Version: March 07 , 2016. Author: CLOUDWEBOPS Document purpose: to make it easier for developers to start and deploy Laravel 5 on Elastic Beanstalk by providing detailed instructions. CLOUDWEBOPS holds no responsibility for misuse of any of the instructions mentioned in this document. Any unauthorized copy of this document,any of it 's part, or publishing it without referencing to CLOUDWEBOPS as author, is strictly forbidden. Note: In addition to this document, we strongly advise you to read “ How to start with Amazon Web Services CLOUDWEBOPS (English version)” so you get acquainted with AWS fundamentals, and to enhance your understanding of this document. All commands available to use in „AWS Elastic Beanstalk Command Line Interface“, with syntax and parameters they can receive can be found on the following link . Table of contents: Elastic Beanstalk Introduction Deploy Laravel 5 APP on Elastic Beanstalk using AWS Management Console Deploy Laravel 5 APP on Elastic Beanstalk using AWS EBCLI and Git Install Python, pip, and the EB CLI on Linux Install Python, pip, and the EB CLI on Windows AWS Elastic Beanstalk configuration files (.ebextensions) Create Database ( MySQL AWS RDS)
Transcript
Page 1: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

[email protected] | www.cloudwebops.com

phone: +381 (0) 66 398 398 | skype: cloudwebops

HQ: Vojvodjanskih brigada 28, Novi Sad, SERBIA

AWS Standard Consulting Partner APN ID: 490243

How to Deploy Laravel 5 on Elastic Beanstalk ­ CLOUDWEBOPS Version: March 07 , 2016. Author: CLOUDWEBOPS Document purpose: to make it easier for developers to start and deploy Laravel 5 on Elastic Beanstalk by providing detailed instructions. CLOUDWEBOPS holds no responsibility for misuse of any of the instructions mentioned in this document. Any unauthorized copy of this document,any of it 's part, or publishing it without referencing to CLOUDWEBOPS as author, is strictly forbidden. Note: In addition to this document, we strongly advise you to read “ How to start with Amazon Web Services ­ CLOUDWEBOPS (English version)” so you get acquainted with AWS fundamentals, and to enhance your understanding of this document. All commands available to use in „AWS Elastic Beanstalk Command Line Interface“, with syntax and parameters they can receive can be found on the following link. Table of contents:

Elastic Beanstalk Introduction Deploy Laravel 5 APP on Elastic Beanstalk using AWS Management Console Deploy Laravel 5 APP on Elastic Beanstalk using AWS EBCLI and Git

Install Python, pip, and the EB CLI on Linux Install Python, pip, and the EB CLI on Windows AWS Elastic Beanstalk configuration files (.ebextensions)

Create Database ( MySQL AWS RDS)

Page 2: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

2

Elastic Beanstalk Introduction Amazon Web Services (AWS) has offered to developers of applications a service that will make it possible for them to spend the majority of their time working on the one thing they like the most, that is, application development. That service is „AWS Elastic Beanstalk“, and it's main purpose is to bring to developers a more simple, faster, and more efficient deployment of their applications, without them having to think about server architecture and resources needed for their application. After the application is deployed on „Elastic Beanstalk“, it takes the responsibility of ensuring resources for the application to run normally. „Elastic Beanstalk“ also gives us full monitoring of our application, as well as monitoring of the resources it's using.

Image 1. Elastic Beanstalk Workflow If we were to discuss the pricing of the „Elastic Beanstalk Service“, it's worth pointing out that the service itself is free, and we only pay for the other services that the „Elastic Beanstalk Service“ is using.

Page 3: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

3

Elastic Beanstalk architecture

Image 2. Elastic Beanstalk app diagram

On the diagram in the „Image 2.“ we can see which are some of the services our application is using once it is deployed on „Elastic Beanstalk“.. ElasticBeanstalk can use several AWS services such as:

Amazon RDS Elastic Load Balancing Auto Scaling Amazon S3

Page 4: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

4

Current version of „AWS Elastic Beanstalk“ uses „Amazon Linux AMI“ or „Windows Server 2012 R2 AMI“. What does this mean for you? It means that when you decide to deploy your application, depending on the environment you've chosen for your application (PHP, Ruby, .NET, Java etc), by default an Amazon EC2 micro instance will be automatically created. Thus, if you've chosen PHP environment it will be the „Amazon Linux AMI“ which will have PHP and Apache web server already installed. After the EC2 instance is created, „Elastic Load Balancer“ which will direct traffic on instances inside the Elastic Beanstalk will also be automatically created right after. Currently, you can deploy applications on „AWS Elastic Beanstalk“ if they're written in one of the following programming languages:

Java PHP Python Node .js Ruby .NET GO

In addition to this, you can also deploy „Docker“ containers. AWS Elastic Beanstalk enables complete monitoring and control of the services it's using. For example, we can directly connect to our Amazon EC2 instance within which a deployment to „AWS Elastic Beanstalk“ was performed. NOTE: The moment we decide the application deployed on „AWS Elastic Beanstalk“ isn't needed anymore, by deleting the application and it's environment we will also delete all the services „AWS Elastic Beanstalk“ used for it's deployment.

Page 5: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

5

Deploy Laravel 5 APP on Elastic Beanstalk using AWS Management Console In order to start using „AWS Elastic Beanstalk“ we need to select it from „ AWS Management Console“.

Image 3. AWS Management Console – choose Elastic Beanstalk

After selecting „Elastic Beanstalk“ service, we'll be presented to the“ Elastic Beanstalk“ starting window.

Page 6: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

6

Image 4. Welcome to Elastic Beanstalk

Select the“ Create New Application“ option.

Image 5. Create New Application

After choosing the „Create New Application“ option, the window for creating, i.e. deploying a new application will appear. You'll enter the name of your application, choose a platform, and select the method of deployment, either you will update it's code later, or upload it as a .zip or .war file.

Page 7: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

7

In this example, we'll directly upload the code via .zip file. Other way is to create the application here by entering it's name, selecting the platform, and then upload the code using „Elastic beanstalk command line interface“. We will explain that in more detail later. For now, we'll proceed with our work through the „AWS Management Console“. We'll download the .zip file from: https://github.com/laravel/laravel , which contains the code of the application we want to deploy. Once the .zip file is downloaded, we'll click on „Upload“, and then select the downloaded .zip file from our local computer.

Image 6. Upload your own code

As we can see, downloading our application's code from the S3 bucket is also possible. Click on „Upload“ , and then on„Configure details“. Before we create our application we need to specify certain details.

Page 8: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

8

Image 7. Details

In case that the Low cost (Free tier eligible) option is chosen for Configuration presets, then we have the „Environment“ i „Software settings“ settings available. Click „Modify“ for Environment.

Page 9: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

9

Image 9. Configure Environment

In „Environment“ we can modify the name, domain, check domain availability, add description as well as tags. NOTE: We cannot add reserved tags, such as „Name tag“. Click on „Save“. After we've done with modifying the Environment settings, we can modify the „Software settings“. Click on „Modify“.

Page 10: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

10

Image 10. Modify Software settings

In „Software settings“ we can add „Environment variables“ if our application uses them, and choose to store logs. We'll choose to store logs on S3 (Amazon Simple Storage Service). Click „Save“. If for „Configuration presets“ the „Highly available“ option is selected, we'll have three additional settings available for modifying.

Page 11: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

11

Image 11. Highly available ­ Details

If we select „Virtual machine“ to modify, we'll see that we can change the instance type here, by default instance type is „t1.micro“. Also, we can select a specific AMI ID, meaning that if created an „Amazon Machine Image“ of one of our instances and we want to use it now, we will enter it's ID here. In addition to this, we can also change type of the disc being used, it's size, as well as it's IOPS (Input/output operations per second for a Provisioned IOPS (SSD)).

Page 12: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

12

Image 12. Details – Virtual machine

We'll leave the default settings and click „Save“. If we select „Modify“ in „Scaling“ we can change the way our environment will scale. We select the minimum and maximum number of instances, number of „Availability zones“ in which our machines will be located, and finally the criteria for scaling. We'll leave the default settings here as well.

Page 13: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

13

Image 13. Modify Auto Scaling details

In „Load balancing“ we can change certain settings as well, such as ports and protocols. We'll leave the default port 80 and HTTP protocol, as we have no security certificate (HTTPS protocol is off).

Page 14: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

14

Image 14. Modify Load balancing options

After we've modified our settings, we'll click on „Create App“. Now we create the environment for our application and it's deployment. Also „Amazon Linux AMI“ is created, as well as the „Load Balancer“ and the rest of the services which will be used by Elastic Beanstalk. Each of these services created are also available via AWS Management Console.

Page 15: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

15

Image 15. Creating application environment We'll wait a few minutes as the environment for our application is being created. When it's done, we'll have the following situation as presented in the image below:

Image 16. Application deployed

Deploy of our application is done. Click on: laraveltestapp.us­west­1.elasticbeanstalk.com But, our application isn't available.

Page 16: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

16

Image 17. You don't have permission to access / on this server.

This happens because by default, „Elastic Beanstalk“ serves the root of your project at the root path of the website. In this case, though, the default page (index.php) is one level down in the public folder.You can verify this by adding /public to the URL. For example, http://larvel.us­east­1.elasticbeanstalk.com/public To resolve this issue, we need to click on „Configuration“ on the right hand side of the screen. There we'll find all the settings that we were able to modify during the process of environment creation.

Image 18. Configure Server configuration

Select to edit settings for „Software configuration“, and in the „Document root:“ setting enter: „/public“.Then click on „Apply“.

Page 17: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

17

Image 19. Container Options

After we've clicked on „Apply“, our environment will be updated.

Image 20. Elastic Beanstalk is updating your environment We will wait until the update is finished, and then we'll try to access our application again via the before mentioned link. Now, as we can see, access to our application is enabled, and it is available via the link, meaning that the deployment was successfully performed.

Page 18: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

18

Image 21. Laravel 5 deployment

This was an example of application deployment using the „AWS Management Console“. There is an alternative way to do this, and that is to deploy your application using „AWS Elastic Beanstalk Command Line Interface“. It's a „shell“ enabling us to work with Elastic Beanstalk using the command line interface.

Deploy Laravel 5 APP on Elastic Beanstalk using AWS EBCLI and Git In order to deploy your application on „Elastic Beanstalk“ using the „AWS Elastic Beanstalk Command Line Interface“ (AWSEBCLI), first we need to install it on our local machine. AWSEBCLI is developed in Python and requires Python versions 2.7 or 3.4 in order to work.

Install Python, pip, and the EB CLI on Linux

1. Check to see whether Python is already installed

python –version

Page 19: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

19

NOTE: If your Linux distribution came with Python, you may need to install the Python developer package in order to get the headers and libraries required to compile extensions and install the EB CLI. Install the developer package (typically named python­dev or python­devel) using your package manager. 2. In case Python isn’t installed, we'll do it with the following command:

sudo apt­get install python2.7 3. To install pip (Python Package Index) we'll use the script located on pypa.io

curl ­O https://bootstrap.pypa.io/get­pip.py 4. Run the script using Python: sudo python get­pip.py 5. Using pip install the EB CLI sudo pip install awsebcli NOTE: If you installed a new version of Python alongside an older version that came with your distribution, you may get an error like the following when trying to invoke pip with sudo: sudo: pip: command not found To work around this issue, use which pip to locate the executable, and then invoke it directly by using an absolute path when installing the EB CLI: which pip /usr/local/bin/pip sudo /usr/local/bin/pip install awsebcli 6. Check if EB CLI is successfully installed with command: eb ­ ­version eb ­­version EB CLI 3.2.2 (Python 2.7.9) Now you've successfully installed „AWS EB CLI“ on your Ubuntu machine.

Page 20: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

20

Install Python, pip, and the EB CLI on Windows When we're talking about Windows operating system, installation of „AWS EB CLI“ is performed as follows:

1. Download and install Python 3.4 from this link

2. After it's installed, add locations to Python home and scripts directory in Windows Path system variable:

C:\WINDOWS\system32;C:\WINDOWS;C:\Python34;C:\Python34\Scripts

3. Open „Windows Command Processor“ C:\Windows\System32> python –version Python 3.4.3

4. Check if „pip“ is installed

C:\Windows\System32> pip ­­version pip 6.0.8 from C:\Python34\lib\site­packages (python 3.4)

5. Install „EB CLI“ using „pip“:

C:\Windows\System32> pip install awsebcli

6. Check if „EB CLI“ is successfully installed: C:\Windows\System32> eb ­­version EB CLI 3.2.2 (Python 3.4.3)

Once you're done with installing „AWS EB CLI“ you'll deploy your application using „EB CLI“ and „Git“. Under assumption that you have „Git“ installed on your local machine, we will download our project from the github repository to our local machine. git clone https://github.com/laravel/laravel.com After downloading our project, we'll navigate to it's folder and then execute the „eb init“ command. The „eb init“ command allows us to set default values for our „Elastic Beanstalk“ application that we'll deploy using „EB CLI“ in a way that we'll be introduced to a series of questions.The values you set with init apply only to the current directory and repository. Until you run the init command, the current running environment is unchanged. Each time you run the init command, new settings get appended to the config file.

Page 21: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

21

Image 22. Eb init command

After running the „eb init“ command, first we need to select the region (by default it's region 3), and for our case we will select the region enlisted under number 4.(eu­west­1: EU (Ireland)). Once we've selected the region, it's necessary to enter the „aws­access­id“ and „security­key“ of our user account used for accessing AWS services. It's mandatory for that account to posses enough privileges to perform all necessary operations. AWS Access key can be created in the „IAM console“ as presented on the image below:

Image 23. Create Access Key

We'll navigate back to the terminal and enter our „Access Key ID“ and „Secret Access Key“.

Page 22: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

22

Image 25. Enter Application Name

Once the data necessary for accessing AWS is entered, we'll need to enter a name for our application. After the name of our application is entered and recognized that our application is using PHP, we will confirm that, and select our version. Now, we are asked whether we want to use SSH access to our instances. We already pointed out that we can control and access all the services being used by „Elastic Beanstalk“. We will select that we want to set up SSH access to our instances, and then enter the name of our key.

Page 23: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

23

Image 26. Creating key pair

Public key is saved on our local machine on this location: /root/.ssh/cloudwebopskey.pub , while the private key is available on our „AWS Console“ in selected region.

Image 27. Key Pair

Page 24: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

24

Image 28. Elastic Beanstalk dashboard after eb init command

If we inspect the folder in which our project is located, we'll notice that after the „eb init“ command was executed, a new folder named .elasticbeanstalk is created. This folder contains the config.yml file, containing all of the settings made by the „eb init“ command.

Image 28. Config.yml

You can associate your environment with different branches of your code so that when you work in a new branch, your default environment also uses that branch. For example, you can type the following to associate the running environment with your master and develop branches:

git checkout master eb use prod git checkout develop eb use dev

By default, the EB CLI deploys the latest commit in the current branch, using the commit ID and message as the application version label and description, respectively. If you want to deploy to your

Page 25: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

25

environment without committing, you can use the ­­staged option to deploy changes that have been added to the staging area. Add new and changed files to the staging area:

git add . Then we deploy them with the „eb deploy“ command:

eb deploy –staged In order to be able to deploy our project we need to create a default environment. We'll do that using „eb create“ command. By executing the „eb create“ command we will enter the name of our environment, and then the code found in directory of our project will be uploaded to S3, from where the deployment of our application will be done. Also, by executing this command, we create instances,security groups and all other services that „Elastic Beanstalk“ will use for deploying our application. If there are any changes that weren't committed, we'll receive this warning: „WARNING: You have uncommitted changes.“

Page 26: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

26

Image 29. Eb create

After the execution of the „eb create“ command is done, the „Elastic Beanstalk dashboard“ will look like this:

Page 27: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

27

Image 30. Eb create command finished

The code from our directory is now deployed. In case there was no code in the directory in which the command „eb create“ was executed, the default application would be deployed. If we try to access our application via the previously mentioned link, we'll receive the same message like the one on the Image 17. In that case we will perform changes to the server configuration again. Once the update of the environment is done, we will have this situation:

Image 31. Environment update completed successfully.

We can access our application through this link:http://cloudwebopslaraveltest.eu­west­1.elasticbeanstalk.com/, as represented on the image below:

Page 28: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

28

Image 32. Deploy success

Using the „eb status“ command we can check the environment status

Image 33. eb status

In order to see all logs from our instances we'll use „eb logs“ command.

Page 29: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

29

Image 34. eb logs

Update is performed using the „eb deploy“ command. This means that once we made some changes on our project, performed commit of those changes to Git, we need to update our application using the „eb deploy“ command. In case that some changes weren't committed we'll receive this warning: „WARNING: You have uncommitted changes.“ We have previously explained how to deploy an application in case we don't want to commit our changes to Git. Overview of all versions we deployed is available on our application's „Elastic Beanstalk dashboard“. We can return to any previous version, at any time by simply selecting the version we want and then click on „Deploy“.

Page 30: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

30

Image 35. Application Versions What we want to show you now is the .gitignore file. If we open the .gitignore file, we'll notice that the Elastic Beanstalk files created during the process of deployment are also added to the .gitignore file.

Image 35. Git ignore

You can tell the EB CLI to ignore certain files in your project directory with a .ebignore file. This file works like a .gitignore. When you deploy your project directory to Elastic Beanstalk and create a new application version, the EB CLI will not include files specified by the .ebignore in the source bundle that it creates.If no .ebignore is present, but a .gitignore is, the EB CLI will ignore files specified in the .gitignore. If an .ebignore file is present, the EB CLI will not read the .gitignore.

Page 31: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

31

AWS Elastic Beanstalk configuration files (.ebextensions) You can add AWS Elastic Beanstalk configuration files (.ebextensions) to your application's source code to configure your environment and customize the AWS resources that it contains. Configuration files are YAML formatted documents with a .config file extension that you place in a folder named .ebextensions and deploy in your application source bundle. The option_settings section of a configuration file defines values for configuration options. Configuration options let you configure your Elastic Beanstalk environment, the AWS resources in it, and the software that runs your application. Configuration files are only one of several ways to set configuration options. The resources section lets you further customize the resources in your application's environment, and define additional AWS resources beyond the functionality provided by configuration options. You can use resources to add and configure any resources supported by AWS CloudFormation, which Elastic Beanstalk uses to create environments. The other sections of a configuration file (packages, sources, files, users, groups, commands, container_commands, and services) let you configure the EC2 instances that are launched in your environment. Whenever a server is launched in your environment, Elastic Beanstalk runs the operations defined in these sections to prepare the operating system and storage system for your application. One configuration file can contain multiple sections, or you can split your configuration into multiple files. Configuration files are processed in alphabetical order, so you can split your configuration activities into multiple stages. Add configuration files to your source code in a folder named .ebextensions and deploy it in your application source bundle.

Image 36. Location of ebextensions in application folder

Page 32: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

32

Besides offering easy deployment of application, „Elastic Beanstalk“ also offers monitoring of our environment.On the next image, you can see how the monitoring of our deployment looks like:

Image 37. Monitoring

Once we don't need are environment anymore, and we want to delete it, we can do it by simply using the „eb terminate“ command. The same can also be performed through the „AWS Management Console“. Once we executed the mentioned command „eb terminate“, all services used by „Elastic Beanstalk“ and our application we deployed will be deleted.

Create Database ( MySQL AWS RDS) NOTE: For that exact reason, we never mentioned the database for our application, because even though during creating of the „Elastic Beanstalk“ we can also create a database for our application, the database itself would also be deleted along with all the data it contains. Because of this, our recommendation is that you create „MySQL database“ for your application using „Amazon Relational Database Service“ (Amazon RDS). In order to create an „RDS MySQL database instance“ we need to open the „RDS console“ on: https://console.aws.amazon.com/rds/. Click on „Launch DB Instance“, select „MySQL“, and then mark that it's for „Dev/Test Environment“.

Page 33: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

33

Image 38. Choose database purpose

In Step 3:“Specify DB Details“ we will select the „db.t2.micro“ instance. We won't perform the „Multi­AZ Deployment", but we will select the disc, the storage capacity, and then also the data needed to login to our base. After this we click on „Next Step“.

Page 34: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

34

Image 39. Specify DB Details

In the „Configure Advanced Settings“ section we have few very important settings.. First is VPC. We'll select the „Default VPC“, and in the „VPC Security Group(s)“ part, we will choose the same security group in which our instances were created by „Elastic Load Balancer“.

Page 35: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

35

Image 40. Configure advanced settings

In the „Database options“ section we will enter the name of our database, and the rest of the settings we won't change. We'll leave them on their default values. Click on Launch DB Instance, and then on View Your DB Instances After that we will see the „RDS dashboard“.

Image 41. RDS dashboard

First thing you'll notice is a warning next to the Endpoints, which tells us that there are „No inbound permissions“. This means that the security group we've selected during creation of our database doesn't have a permitted exception for port 3306. Security groups act as your firewalls, so you need to add an exception for our „RDS Instance“. Now click on „Edit Security Group“, and then add an „Inbound rule“ for port 3306 TCP protocol.

Page 36: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

36

Image 42. Edit inbound rules

After the exception is added, our RDS instance is now available, and it's Endpoint can be used in our application's config files for connection to our database. We have already mentioned several times that „Elastic Beanstalk“ allows access to the services it uses, so if we need to we can always connect directly to our instance on which our application is deployed. Instance can also be found in our „AWS Console“ in the section:EC2 Dashboard, Instances.

Image 43. EC2 Instances used from Elastic Beanstalk

This can be very useful for troubleshooting our application. If we encounter any issues after deployment, we can directly connect to our instance and find our application's deployment on /var/app/current location, as well as all the log files in order to discover errors.

Page 37: How to Deploy Laravel 5 on Elastic Beanstalk - CLOUDWEBOPS

37

Image 44. Connected to Elastic Beanstalk instance


Recommended