Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

716
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!