Open dn-github opened 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.
@ajbeach2 We tried to run github.com/ajbeach2/s3gof3r version on ECS instance (with proper credentials settings) but without success. Here are the details:
ecs_gof3r
executable via:
env GOOS=linux GOARCH=amd64 go build -o ecs_gof3r github.com/ajbeach2/s3gof3r/gof3r
COPY
the ecs_gof3r
into docker image over ubuntu:16.04
:
COPY ./etc/ecs_gof3r /app/etc/ecs_gof3r
docker run
example:
docker run -it \
...
${IMAGE_NAME} \
/usr/local/bin/aws s3 cp s3://dev-gefjon-sandbox-2/test.txt -
The result was without errors.
ecs_gof3r
example did not run successfully:
docker run -it \
...
${IMAGE_NAME} \
/app/etc/ecs_gof3r get -b dev-gefjon-sandbox-2 -k test.txt --endpoint s3-eu-central-1.amazonaws.com
Output:
2019-08-22 12:40:37 gof3r error: no AWS keys found
That could we do wrong?
@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")
@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?
@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!
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?