Skip to content

Is there parity for aws s3 sync? #824

Description

@csuhta

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?

Activity

  1. trevorrowe commented on May 27, 2015

    @trevorrowe
    Contributor

    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.

  2. jufemaiz commented on Nov 26, 2016

    @jufemaiz

    :(

  3. davidcpell commented on Jan 23, 2018

    @davidcpell

    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.

  4. shaunakv1 commented on Jul 20, 2018

    @shaunakv1

    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.

  5. added
    guidanceQuestion that needs advice or information.
    on Dec 24, 2018
  6. pparamalingam commented on Aug 8, 2019

    @pparamalingam

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

  7. george-viaud commented on Dec 27, 2019

    @george-viaud

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

    Does this exist?

  8. mullermp commented on Dec 27, 2019

    @mullermp
    Contributor

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

  9. krysgian commented on Jan 31, 2020

    @krysgian

    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.

  10. sudodevnull commented on Jan 7, 2021

    @sudodevnull

    Any update on this?

  11. VitalyTarasiu commented on Apr 20, 2021

    @VitalyTarasiu

    We are in 2021, any updates?

  12. aymenbuu commented on Jun 1, 2021

    @aymenbuu

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

    Still waiting for this feature to drop :(

  13. dig12345 commented on Jun 21, 2021

    @dig12345

    +1

  14. shaunakv1 commented on Jul 7, 2021

    @shaunakv1

    @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

  15. JVerma205 commented on Nov 21, 2021

    @JVerma205

    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.

  16. midnight-wonderer commented on Mar 9, 2022

    @midnight-wonderer
    Contributor

    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.

  17. jterapin commented on Aug 14, 2026

    @jterapin
    Contributor

    Hi and apologies for the very long silence here. Good news: the Ruby SDK now has a high-level TransferManager that can recursively transfer a whole directory tree to/from S3, which meets the spirit of what you were after:

    require 'aws-sdk-s3'
    
    tm = Aws::S3::TransferManager.new
    tm.upload_directory('/path/to/local/dir', bucket: 'my-bucket', recursive: true)
    tm.download_directory('/path/to/local/dir', bucket: 'my-bucket')

    More detail and examples here: Transfer Manager directory support for the AWS SDK for Ruby.

    One honest caveat: this does a full recursive transfer rather than a true aws s3 sync, so it doesn't yet compare size/modified-time to skip unchanged files. Since the directory-transfer support covers the core of this request, I'm going to close this out. If you'd specifically like the delta/copy-only-changed behavior, please open a new issue for i, and of course feel free to open anything else or ask questions.

  18. github-actions commented on Aug 14, 2026

    @github-actions

    This issue is now closed. Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions