0

I am running my docker container in Fargate via AWS Batch. I am specifying the EphemeralStorage option in the job definition file like so:

"ephemeralStorage": {"sizeInGiB": 21},

Question is how to access/consume this ephemeral storage in the container being executed in AWS Batch?

Do I need to define a volume to access it? Any help would be appreciated.

I have no idea how to access this ephemeral storage from my container. Do I need to setup a Volume and Volume Mount or is it mounted automatically?

1 Answer 1

0

Ephemeral storage for ECS is meant to be used for bind mounds, you can check out this link to see how to configure them.

If you want persistent storage, the kind you'd get though volumes, you should check out Amazon EFS if you're using Fargate deployments.

3
  • Hi Jesus, I am aware of this link you sent but still I do not know how to implement this in my AWS Batch job... I need to understand how I access this ephemeral storage from within my container. Can you provide an example that I can use?
    – Eyal Gonen
    Commented Jul 10 at 9:16
  • This isn't an AWS Batch question, this question can be rephrased as "How to write files". For example, in node you could use fs.writeFile(...). Commented Jul 17 at 12:17
  • Hi Jesus, I want to write files to the Ephemeral Storage but I do not know how to access it from my code - what is the path to this Ephemeral Storage from within my container? Do I need to mount this Ephemeral Storage or is automatically mounted to my container? If it is auto-mounted - to what path is it auto-mounted?
    – Eyal Gonen
    Commented Jul 19 at 7:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.