I am very new to Amazon Web Services and I am just trying to upload one of my applications to the Elastic Beanstalk instance I have obtained. My project is written in PHP and it runs best in 5.4. I zipped the content; created an application in my EB instance; and, uploaded the source code with the platform as PHP. By default, Elastic Beanstalk created the application with PHP version 7.3 (PHP 7.3 running on 64bit Amazon Linux/2.9.4. And, I do not have an option to choose a different version of it. The only other version I see in platform change
is PHP 7.3 running on 64bit Amazon Linux/2.9.3
.
Any idea on how to add PHP 5.4 to the platform and make my application use it?
3
Answers
Actually, using the EB CLI,
eb init -p php-5.4
did the trick. I did not have to use a custom platform or docker to downgrade the version of an existing application. To use a version other than the latest version for the application, using the CLI with the-p
option takes care of the job.Your best bet is Elastic Beanstalk Custom Platforms:
Personally, I would consider the effort needed to upgrade the application to the latest supported 7.x runtime. Legacy software platforms are a potential security hazard.
You can use docker based deployment in beanstalk as an alternative.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.html