wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

Howto retrieve a file from s3? #232

Open MSSputnik opened 5 years ago

MSSputnik commented 5 years ago

I found no command to retrieve a file from s3.

search for a command simmilar to aws s3 cp s3://<bucket>/<path>/<file> <localfile>

currently used awless version is v0.1.11

sbz commented 5 years ago

Same, it doesn't seems to be existing right now on version v0.1.11. There is a subcommand called copy which is possible to use using image and snapshot (cf. awless copy -h). It should be possible to implement the retrieve of a file from S3 using the new function bucket:

This could be implemented using the subcommand copy bucket:

awless copy [-r|--recursive] bucket s3://<bucket>/<path>/<file> <localfile>

Looking into to the code implementation, there is test case example how to make it happens here but it should requires some modifications.

dserodio commented 5 years ago

bucket should refer to a whole bucket. The contents of buckets (so called files) are named objects