Getting Started / Hands-on / ...
with AWS Elastic Beanstalk
This tutorial will cover how to update your existing application and then how to delete your Elastic Beanstalk environment, which includes your application. This tutorial is a continuation from the Launch an Application with AWS Elastic Beanstalk tutorial, so please go through that tutorial first if you haven’t already. This tutorial will cover how to update your existing application and then how to get rid of your Elastic Beanstalk environment, which includes your application.
Updating an Application with AWS Requires an Account
Create a Free Account in MinutesReceive twelve months of access to the AWS Free Usage Tier and enjoy AWS Basic Support features including, 24x7x365 customer service, support forums, and more.
a. Navigate to the directory where you downloaded the php-v1.zip file in the previous tutorial.
Windows Users: To unzip the php-v1.zip file, right click on the php-v1.zip file, click Extract All..., then click Extract.
Mac Users: Double click on the php-v1.zip file, and this will automatically unzip the file into a php-v1 folder in the same directory.
b. Navigate into the newly unzipped php-v1 directory. Open index.php using your favorite text editor. You will make a small edit here that is an example of an application change. Look on line 26 for <h1>Congratulations!</h1>. Replace Congratulations!, with Application Updated! in between the <h1> and </h1> tags. Then save the index.php file (overwriting the original).
Next you will need to zip your application so it can be uploaded to AWS as an update package.
Windows users: Please select Windows below to see how to create the zipped application file.
Mac & Linux users: Please select Mac/Linux below to see how to create the zipped application file.
a. Click here to open the Elastic Beanstalk console. Within the Elastic Beanstalk dashboard, click on php-sample-app at the top of your screen, and this should show a drop-down menu where you should select Application Versions.
b. Here you should see one entry in the Version Label column titled First Release. The Source column for this entry should show the php-v1.zip file we uploaded in the previous tutorial. Click on Upload, enter Second Release for Version label, then Sample PHP App Update for Description. Click Browse, then navigate to the location where your php-v2.zip file is located, Select the php-v2.zip file and click Upload.
c. You should now see Second Release within the application versions table. Check the box for Second Release, then click Deploy. You should see your Environment defaulted to phpSampleApp-env. Leave the default settings here and click Deploy. Lastly, click Elastic Beanstalk in the top left hand corner of the web page.
Now that you have an Elastic Beanstalk application up and running, the next tutorial will walk you through registering a domain name so your website/application can be easy to access.