aws-sdk-ruby icon indicating copy to clipboard operation
aws-sdk-ruby copied to clipboard

Is there parity for `aws s3 sync`?

Open csuhta opened this issue 10 years ago • 16 comments

The AWS CLI has the the amazing aws s3 sync command which I use frequently. It's super fast because in some cases it only copies the delta between the buckets.

There doesn't seem to be a similar way to invoke that API from this library. Is it here and I'm just missing it?

csuhta avatar May 26 '15 18:05 csuhta

The aws-sdk gem does not provide this functionality. As far as I know, none of the AWS SDKs, except the CLI have a filesystem to S3 sync function.

trevorrowe avatar May 27 '15 16:05 trevorrowe

:(

jufemaiz avatar Nov 26 '16 11:11 jufemaiz

As far as I know, none of the AWS SDKs, except the CLI have a filesystem to S3 sync function.

Hi, just wanted to stop by and add my :( to this. Sync functionality has been available in the PHP SDK since 2013. The Java SDK also has this/something similar.

davidcpell avatar Jan 23 '18 23:01 davidcpell

Same here.. just stopping by again to add my :(

This is a really useful feature to have in sdk, so we don't have to install cli dependency on hosting, and our background jobs can run purely on gem dependency.

Adding this feature will make it whole lot easier to do PaaS deployments on system like Heroku.

shaunakv1 avatar Jul 20 '18 03:07 shaunakv1

Bumping for 2019. Any chance of having this function added to the Ruby SDK?

pparamalingam avatar Aug 08 '19 18:08 pparamalingam

Looking for SDK equivalent SDK method for aws s3 sync [SOURCE] s3://[BUCKET]/[KEYPREFIX] --exact-timestamps

Does this exist?

george-viaud avatar Dec 27 '19 01:12 george-viaud

Reopening as a feature request. Happy to take an PRs.

mullermp avatar Dec 27 '19 17:12 mullermp

Need the ability to run: aws s3 sync s3://accountOne/sourceBucket/etc s3://accountTwo/targetBucket/etc --delete --include="*"

Using the API, you can create a TransferManager object, but it assumes a single S3 AWS connection. An API change would hopefully accommodate this use case.

krysgian avatar Jan 31 '20 21:01 krysgian

Any update on this?

sudodevnull avatar Jan 07 '21 20:01 sudodevnull

We are in 2021, any updates?

VitalyTarasiu avatar Apr 20 '21 20:04 VitalyTarasiu

^ @VitalyTarasiu I can second this. We are in 2021.

Still waiting for this feature to drop :(

aymenbuu avatar Jun 01 '21 21:06 aymenbuu

+1

dig12345 avatar Jun 21 '21 19:06 dig12345

Just do the loop yourself, the SDK only contains the actual API calls, not some utility that goes on top. It's not very hard. CS102, recurse through directories.

ghost avatar Jul 06 '21 17:07 ghost

@pviet-cohere it's not "just a loop". May be read up on the documentation for the original utility?

https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

shaunakv1 avatar Jul 07 '21 00:07 shaunakv1

Hi guys, I also am looking for SDK equivalent of CLI aws sync; I found this really helpful article that served my purpose. The code is easy to run as well. https://blog.bitsrc.io/a-practical-guide-to-building-a-node-js-service-on-an-aws-s3-bucket-aff19105ba83

Nevertheless, I do request aws-sdk to include the sync feature to standardize the algo.

JVerma205 avatar Nov 21 '21 06:11 JVerma205

I know my comment will be unpopular; I braced for ☹️.
But, what's wrong with installing the AWS CLI? If you don't want it on the host, you can also install it inside a container.

I personally will choose neither SDK nor CLI for sync. Because, IMO, there is an economy behind software.
Old programmers are starting to die, literally; software, although still young on average, can live much longer than humans.
We are heading in the direction where there are not enough humans to maintain software; we are outnumbered. If not enough people are using it, it is potentially not viable.

You'll get better priority, support, and maintenance by switching to something more specific, like Rclone.
And posix-spawn isn't too much of a pain, is it?

Anyway, it seems the AWS team is still open for the PR; if you really want this, you should go for it.

midnight-wonderer avatar Mar 09 '22 13:03 midnight-wonderer