Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

714
Vistas
Persistent storage on Elastic Beanstalk Docker Container

I'm looking for some way to mount a S3 Storage Bucket (for example) as Docker volume in an Elastic Beanstalk Docker Container.

Since i can't change the application code, i have to configure that part in the Dockerrun.aws.json file using Docker volumes.

I need to mount a file for a single configuration file and a volume for a file directory in my application.

Here's my Dockerrun.aws.json file.

{
    "AWSEBDockerrunVersion": "1",

    "Image": {
        "Name": "app"
    },
    "Ports": [
        {
            "ContainerPort": 8080,
            "HostPort" : 80
        }

    ],
    "environment": [
        {
          "name": "app_DB_MYSQL",
          "value": ""
        },
        {
            "name": "app_DB_USERNAME",
            "value": "app"
        },
        {
            "name": "app_DB_PASSWORD",
            "value": ""
        },
        {
            "name": "app_DB_DATABASE",
            "value": "app"
        }
      ],

      "volumes": [
        {
            "HostDirectory": "files",
            "containerPath": "/usr/src/app/files",
        },

        {
            "HostDirectory": "configuration.yaml",
            "containerPath": "/usr/src/app/config/configuration.yaml",
        }
      ],

    "Logging": "/var/log",

}
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

For persistent storage Elastic Beanstalk with Amazon Elastic File System is generally used:

  1. edit storage-efs-createfilesystem.config, add it to the .ebextensions directory and deploy
  2. then remove storage-efs-createfilesystem.config from .ebextensions, edit and add storage-efs-mountfilesystem.config to .ebextensions, edit Dockerrun.aws.json to match storage-efs-mountfilesystem.config and redeploy.

Sample storage-efs-mountfilesystem.config extract:

option_settings:
  aws:elasticbeanstalk:application:environment:
    FILE_SYSTEM_ID: 'fs-REPLACE_THIS_WITH_ID!'
    MOUNT_DIRECTORY: '/efs'

Sample Dockerrun.aws.json extract:

"Volumes": [
    {
        "HostDirectory": "/efs/app",
        "ContainerDirectory": "/usr/src/app",
    }
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda