Enable the EPEL repository on AWS Elastic Beanstalk

amazon-amielastic-beanstalkepelyum

I need to install some tools from the Extra Packages for Enterprise Linux repository (EPEL) that are not available in the default repositories of the Amazon Linux AMI. /etc/yum.repos.d/epel.repo already contains the needed repository, but it is disabled. This is mentioned by Amazon in their FAQ.

Can I enable this repo (i.e. change enabled=0 to enabled=1) from a configuration file in my .ebextensions directory or similar? Not surprisingly, I need the change to persist between different instances and environments, so changing it manually is not enough.

Best Answer

extending Brian's comment - something like this in your .config

packages:
  yum:
    git: []
    postgresql93-devel : []
    geos: []

commands:
  01_gdal:
    command: "yum --enablerepo=epel -y install gdal"