Changing the Platform version in Elastic Beanstalk application

AWS Elastic Beanstalk is a cloud deployment and provisioning service which automates the process of getting applications up and running on the Amazon Web Services infrastructure.

It supports environments such as Java, PHP, Python, .Net, Node.js, Ruby, and Docker on familiar servers such as EC2, S3, SNS, ELB, and Auto-scaling.

Approach 1

  • change the configuration in the dashboard via GUI.

Approach 2

  • Navigate yourself to the s3 bucket corresponding to the Elastic beanstalk.

  • Find the corresponding configuration file in the Elastic Beanstalk bucket, in
    1. It can be found in the Corresponding Bucked related to the Elastic Beanstalk
    2. Inside the bucket find resource object, followed by template Object
    3. Select the appropriate application object in the S3 bucket and Download the configuration file inside the template

  • Point the platform version to the new Elastic Beanstalk platform

For eg: changing the PHP version from 7 to 5.6
Update the platform arn to points to the Elastic Beanstalk PHP 5.6 platform
platform/PHP 7.1 running on 64bit Amazon Linux
changed to platform/PHP 5.6 running on 64bit Amazon Linux

Wait for the Health check to complete. That concludes the successful upgrade of the platform version using elastic beanstalk.

Conclusion

AWS Elastic Beanstalk makes it even easier for developers to quickly deploy and manage applications in the AWS Cloud. If we had deployed an elastic Beanstalk with the latest platform version, there might come in a situation that we are not able to downgrade the platform version. So we must manually upload the environment platform configuration file and load it to the Elastic Beanstalk. Elastic Beanstalk applies managed updates with no downtime or reduction in capacity and cancels the update immediately.