How to increase the timeout of Elastic Beanstalk deployments?

As part of my application deployment, I have some commands in my .ebextensions config files. It might take 20 minutes or more for all the commands to complete, the first time the commands are run (cloning big repositories).

Unfortunately, this triggers a timeout during deployment:

INFO Deploying new version to instance(s).
WARN The following instances have not responded in the allowed command
     timeout time (they might still finish eventually on their own).
INFO Command execution completed. Summary: [Successful: 0, TimedOut: 1].

Is it possible to increase this timeout? I can't find the option in my environment settings.


You can add AWS Elastic Beanstalk configuration files (.ebextensions) to your web application's source code to configure your environment and customize the AWS resources that it contains.

The option_settings section of a configuration file defines values for configuration options. Configuration options let you configure your Elastic Beanstalk environment, the AWS resources in it, and the software that runs your application.

Add configuration files to your source code in a folder named .ebextensions and deploy it in your application source bundle.

Example:

option_settings:
    - namespace: aws:elasticbeanstalk:command
      option_name: Timeout
      value: 1000

*"value" represents the length of time before timeout in seconds.

References: Official AWS Elastic Beanstalk Environment Configuration and General Options for All Environments, this stackoverflow answer and this AWS Developers Forum post.