I'd like to add these PHP settings to my Elastic Beanstalk environment:
upload_max_filesize = 64M
post_max_size = 64M
These options cannot be set with option_settings in .ebextensions
:
Namespace | Extend
---------------------------------------------|-------
aws:elasticbeanstalk:application:environment | Yes
aws:elasticbeanstalk:container:php:phpini | No
How can I add custom settings to php.ini
in an Elastic Beanstalk container?
The cleanest way I found is to use a .ebextensions config file in my project archive:
Sample
.ebextensions/project.config
file:When the application version is deployed, this will write a custom config file in the
php.d
directory, that will override anyphp.ini
setting.