Increment command timeout in EBS from the Dockerrun.aws.json -AWS

I am deploying a Dockerfile and a Dockerrun.aws.json in Elastic beanstalk and it was giving an error because some commands were surpassing the maximum command timeout. I can fix this error by going to Updates and Deployments, and modifying the maximum timeout. But I would like to know if there is a command to increase the maximum command timeout of EBS from the Dockerrun.aws.json? or another way to do that automatically ?

  • Elastic beanstalk: Failed to buld docker image
  • What causes the EB cli to package an app as file name 1 (app-123456-654321.zip) vs file name 2 (9f1b.zip)?
  • How to use fluentd log driver on Elastic Beanstalk Multicontainer docker
  • Angular 2 app deploy in a docker Container running on AWS
  • Configure Dockerfile to set AWS configurations
  • How do you setup an AWS Elastic Beanstalk Docker Platform running Django?
  • Arch Linux, Docker “No space left on device.”
  • Docker automated build from private bitbucket repo: Failed to clone repository
  • Is it possible to “mount” virtual CPU located in the cloud?
  • prior storage driver “aufs” failed: driver not supported Error starting daemon: error initializing graphdriver: driver not supported
  • Emulate Bluetooth LE Adapter for Acceptance Testing
  • Docker: RUN touch doesn't create file
  • 2 Solutions collect form web for “Increment command timeout in EBS from the Dockerrun.aws.json -AWS”

    No you cannot increase the timeout using Dockerrun.aws.json but you can bundle an ebextension in your app source with this option setting.

    Create a file in your app source in a directory called .ebextensions. Lets say the file is .ebextensions/01-increase-timeout.config.

    The contents of the file should be:

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

    Note this file is in YAML format.
    After this you can update your environment with this version of source code.

    Previously answered here: https://stackoverflow.com/a/25558805/161628

    Another option is to do this using the Aws Tools for Windows PowerShell. This one liner will get every EB environment in your account and then set the command timeout to 400 seconds, with a 15 second sleep between each command to avoid AWS’s API rate limits.

    PS C:\> get-ebenvironment | % {start-sleep -Seconds 15;  Update-EBEnvironment -ApplicationName $_.ApplicationName -EnvironmentName $_.EnvironmentName -OptionSetting @{"namespace"="aws:elasticbeanstalk:command"; "optionName"="Timeout";  "value"=400} }
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.