You are currently viewing How To Deploy A New Application Version In Elastic Beanstalk

How To Deploy A New Application Version In Elastic Beanstalk

How to deploy a new application version in Elastic Beanstalk

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed how to deploy an application using Elastic Beanstalk.

https://cloudaffaire.com/how-to-deploy-an-application-using-elastic-beanstalk/

In this blog post, we will discuss how to deploy a new application version in Elastic Beanstalk.

How to deploy a new application version in Elastic Beanstalk:

Elastic Beanstalk automatically creates an application version whenever you deploy an application for the 1st time, create a new environment of existing application or upload source code to an existing application version in existing environment. Application version enables an application developer to undo redo changes in application. For example, suppose your latest deployment has some bug, you can quickly apply the previous working version of your application using application version. Application version also support source bundle stored in S3, where you keep your new application version ready by uploading it to an S3 bucket without deploying it. Elastic Beanstalk deletes these application versions according to the application’s lifecycle policy or when you delete the application.

Next, we are going to deploy a new application version to our PHP web application.

Prerequisite for this demo:

  • PHP web application deployed to Elastic Beanstalk (as per previous blog post)

Step 1: Login to the AWS console and navigate to ‘Elastic Beanstalk’.

How To Deploy A New Application Version In Elastic Beanstalk

Step 2: From ‘Actions’ click ‘View application versions’.

How To Deploy A New Application Version In Elastic Beanstalk

Step 3: Click ‘Upload’, to upload a new application version.

How To Deploy A New Application Version In Elastic Beanstalk

Note: We already have one application version created by default when we deployed our application.

Step 4: Choose your file and provide a version label. Click ‘Upload’ to upload the code.

How To Deploy A New Application Version In Elastic Beanstalk

You can download MyShoppingListV2.zip from below GitHub repository.

https://github.com/CloudAffaire/Elastic-Beanstalk

New application version created successfully.

How To Deploy A New Application Version In Elastic Beanstalk

The application code is uploaded to S3 bucket.

How To Deploy A New Application Version In Elastic Beanstalk

Next, we are going to deploy this new application version.

Step 5: Select the version that you want to deploy and from ‘Actions’ click ‘Deploy’.

How To Deploy A New Application Version In Elastic Beanstalk

Select the environment and click ‘Deploy’.

How To Deploy A New Application Version In Elastic Beanstalk

Note: Currently we have only one environment for our application.

New application version deployed successfully.

How To Deploy A New Application Version In Elastic Beanstalk

How To Deploy A New Application Version In Elastic Beanstalk

How To Deploy A New Application Version In Elastic Beanstalk

Cleanup:

Navigate to application root and from ‘Actions’ click ‘Delete application’.

How To Deploy A New Application Version In Elastic Beanstalk

Provide application name and click ‘Delete’.

How To Deploy A New Application Version In Elastic Beanstalk

Hope you have enjoyed this article. In the next blog post, we will discuss application version lifecycle in Elastic Beanstalk.

To get more details on AWS Elastic Beanstalk, please refer below AWS documentation

https://docs.aws.amazon.com/elastic-beanstalk/index.html

 

Leave a Reply