Shalom Carmel
asked on
AWS CloudFormation: Need to install a new php version
I have a CloudFormation template that sets up a server with Apache and PHP.
For an example, look at this simple template that installs php and httpd.
https://s3.amazonaws.com/cloudformation-templates-us-east-1/WordPress_Single_Instance.template
The setup is done in the "AWS::CloudFormation::Init " section via the following snippet
The thing is that this method installs php 5.3.29, and I need at least 5.4.
According to documentation, the required version number can be included in the package description, so I tried this
So how do I make CloudFormation install php 5.4?
I can modify the template to run an install command via the user-data, like this
But it is rather inelegant.
For an example, look at this simple template that installs php and httpd.
https://s3.amazonaws.com/cloudformation-templates-us-east-1/WordPress_Single_Instance.template
The setup is done in the "AWS::CloudFormation::Init
"packages" : {
"yum" : {
"php" : [],
"httpd" : []
}
},
The thing is that this method installs php 5.3.29, and I need at least 5.4.
According to documentation, the required version number can be included in the package description, so I tried this
"php" : ["5.4"],
and this"php" : ["54"],
but nothing works. Specifying the version number causes php to not be installed at all, and ultimately to stack failure and rollback. So how do I make CloudFormation install php 5.4?
I can modify the template to run an install command via the user-data, like this
yum -y install php54
But it is rather inelegant.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Did not get any relevant solutions and solved the problem on my own
Open in new window