rlmcpherson / s3gof3r

Fast, concurrent, streaming access to Amazon S3, including gof3r, a CLI. http://godoc.org/github.com/rlmcpherson/s3gof3r
MIT License
1.14k stars 180 forks source link

Using gof3r in docker image to run on ECS #140

Open dn-github opened 5 years ago

dn-github commented 5 years ago

I am trying to use gof3r in my docker image and running the container on AWS ECS. The ECS has proper IAM set to access S3 bucket, hence I expect gof3r to download a file from my S3 bucket. However gof3r returns error saying 'No AWS Keys Found'. Do I expect gof3r to run with IAM permission anytime soon?

ajbeach2 commented 5 years ago

https://github.com/ajbeach2/s3gof3r

I forked for this specific reason. I haven't gotten around to submitting a PR but it seems this repo may or may not be actively maintained.

ady1981 commented 5 years ago

@ajbeach2 We tried to run github.com/ajbeach2/s3gof3r version on ECS instance (with proper credentials settings) but without success. Here are the details:

ajbeach2 commented 5 years ago

@ady1981 aww sorry, i left out some details. My branch doesn't work with the CLI. I have only been using it as a package. I added a method called ECSKeys() that loads from keys the ECS role.

k, err := ECSKeys() // get S3 keys from ECS
if err != nil {
    return err
}

// Open bucket to put file into
s3 := New("", k)
b := s3.Bucket("bucketName")
ajbeach2 commented 5 years ago

@ady1981 I just pushed a fix to master of my branch.

the change is here: https://github.com/ajbeach2/s3gof3r/commit/e1c1768272f26ea82efed0ab497998ba9d61fff5

This should work with the CLI now can you try again?

ady1981 commented 5 years ago

@ajbeach2 We rebuilt the CLI with the ECSKeys usage fix + dependence fix ('github.com/ajbeach2/s3gof3r' -> 'github.com/rlmcpherson/s3gof3r' in all imports) and now it works ok. Thanks!