Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mount S3 Bucket on AWS ECS

I am trying to setup Jenkins server on AWS ECS, but I am having to issue mounting S3 to my Docker container.

Can anyone provide me task definition which can mount s3 bucket with Service of ECS? soi can store my Jenkins workspace on s3

like image 869
Hardik Shah Avatar asked May 19 '17 05:05

Hardik Shah


People also ask

Does ECS use S3?

Dell ECS is a software-defined, cloud-scale, object storage platform that delivers S3, Atmos, CAS, Swift, NFSv3, and HDFS storage services on a single, modern platform.

Why would you mount an S3 bucket to an instance?

Advantages of Mounting Amazon S3 as a File System Mounting an Amazon S3 bucket as a file system means that you can use all your existing tools and applications to interact with the Amazon S3 bucket to perform read/write operations on files and folders. Can EC2 mount Amazon S3?


2 Answers

Consider that S3 is a storage platform with very specific characteristics; it doesn't allow for partial update, it doesn't actually has a folder structure and so on. On the surface it might have a lot of similarities with a filesystem, but it is not build to be one nor should it be used as one.

You can create and attach EBS or EFS volumes to your Docker container. Alternatively, you could use or create a plugin that stores some data on S3 with the specific API's that S3 has.

like image 153
Bram Avatar answered Oct 24 '22 04:10

Bram


You can install s3fs in your EC2 instances (or may be use a custom AMI for your ECS cluster). Mount the S3 bucket in the EC2 instance and then you can always share the host path.

like image 37
Jaydeep Dave Avatar answered Oct 24 '22 04:10

Jaydeep Dave