8

there is a simple way to copy files from local host to AWS ECS Fargate container?

Like Docker cp docker cp :/file/path/in/container/file /host/local/path/file ?

I've found some workarounds like:

  • pass through a S3 Bucket (I have to install AWS cli on container and give him credentials inside container...not a beaeutiful thing!)
  • mount an EFS shared folder in EC2 instance (I've to mount EFS folder in instance and upload the file to it from my host...2 steps and shared folder)

Can someone help me please?

Thanks

DivinoTaras
  • 101
  • 1
  • 4
  • 1
    It's serverless technology- you have to expect to take some steps to give the task access to a file and you have exhausted the options already. Your first option would not to my mind be considered out of the ordinary-install the cli in your Dockerfile and have an ECS Task Role with s3 access - that's standard stuff. – Ronan Cunningham Sep 17 '21 at 13:25
  • Thanks, maybe in future Amazon will provide this direct access like Docker. S3 approach means that you have to store aws credential (unless with limitate access) and I don't like too much this solution, but if there aren't alternatives... – DivinoTaras Sep 20 '21 at 07:03
  • Perhaps it's a language thing but providing a ECS Task role and 'having to store aws credentials' are different things in intent and implication. – Ronan Cunningham Sep 20 '21 at 08:05

0 Answers0