Search code examples
amazon-web-servicesamazon-elastic-beanstalkamazon-elb

Install ghostscript on load balanced Aws Beanstalk


I am using ghostscript on my current server. Now I am moving to an Aws beanstalk server with Application load balancer.

How do I configure start-up script on elastic beanstalk so whenever a new instance is created by the load balancer, ghostscript is automatically installed.


Solution

  • You can control what's installed in ElasticBeanstalk instances with .ebextensions file.

    Whenewher Elastic Beanstalk creates a new EC2 instance, it will run all commands from the file in order to provision instance.

    Example of .ebextensions file for installing Ghostscript

    packages:
      yum:
        ghostscript: []
    

    This will install a version of ghostscript from yum repository.

    If you need a never version of ghostscript - it is also possible to specify installation shell commands inside ebextensions file. For example, these commands will install Ghostscript 9.23