AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Extending php.ini

Use a configuration file with a files block to add a .ini file to /etc/php.d/ on the instances in your environment. The main configuration file, php.ini, pulls in settings from files in this folder in alphabetical order. Many extensions are enabled by default by files in this folder.

Example .ebextensions/mongo.config

files:
  "/etc/php.d/99mongo.ini" :
    mode: "000755"
    owner: root
    group: root
    content: |
      extension=mongo.so