Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    13comments
  2. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    236comments
  3. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    125comments
  4. “The Secret Life of Circuits” is here(coredump.cx ↗)
    30comments
  5. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    115comments
  6. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    94comments
  7. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    479comments
  8. San Francisco Onion Futures Company(onionfutures.com ↗)
    83comments
  9. Show HN: I wrote a custom assembler for CHIP-8 in C++(github.com/tackx ↗)
    discuss
  10. Communication by means of modulated Johnson noise(pnas.org ↗)
    8comments
  11. Cloudflare Quick Tunnels(cloudflare.com ↗)
    292comments
  12. How to Write with an LLM(sockpuppet.org ↗)
    345comments
  13. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    2comments
  14. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    19comments
  15. SDCC – Small Device C Compiler(sourceforge.net ↗)
    20comments
  16. Saving another 100TB of RAM(cloudflare.com ↗)
    84comments
  17. Science Is Open Software(jepedersen.dk ↗)
    41comments
  18. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    98comments
  19. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    39comments
  20. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  21. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    4comments
  22. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    108comments
  23. OpenJev(openjev.com ↗)
    273comments
  24. Goroutine Leak Profiles(go.dev ↗)
    5comments
  25. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    89comments
  26. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    74comments
  27. Veronese's Dogs(publicdomainreview.org ↗)
    2comments
  28. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    14comments
  29. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    87comments
  30. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    105comments

S3 as a Git remote and LFS server

197 pointsby 1y agogithub.com
52 comments
1y agoHN ↗

moto server for testing S3 is pretty great. It’s about the same experience as using a minio container to run integration tests against.

I use this, and testing.postgresql for unit testing my api servers with barely any mocks used at all.

1y agoHN ↗

Happy 10,000th Day to you :-D Yes, moto and its friend localstack are just fantastic for being able to play with AWS without spending money, or to reproduce kabooms that only happen once a month with the real API

I believe moto has an "embedded" version such that one need not even have in listen on a network port, but I find it much, much less mental gymnastics to just supersede the "endpoint" address in the actual AWS SDKs to point to 127.0.0.1:4566 and off to the races. The AWS SDKs are even so friendly as to not mandate TLS or have allowlists of endpoint addresses, unlike their misguided Azure colleagues

1y agoHN ↗

Happy 10,000th Day to you :-D

Sorry, not sure what you mean?

1y agoHN ↗

there are SO MANY s3 storage implementations

I suppose given this is under the AWS Labs org, they don’t really care about non-AWS S3 implementations.

1y agoHN ↗

Well, I look forward to their `docker run awslabs/the-real-s3:latest` implementation then. Until such time, monkeypatching api calls to always give the exact answer the consumer is looking for is damn cheating

1y agoHN ↗

it wouldn't be unprecedented. dynamodb-local exists.

1y agoHN ↗

Agreed, haha. Well, I think it should work with Minio & co. just as well, but be prepared to have your issues closed as unsupported. (Pesonally, I might give it a go with Backblaze B2 just to play around, yeah)

1y agoHN ↗

Unfortunately there's been a few vulnerability since that old Minio release. For something you expose to users, it's a problem.

1y agoHN ↗

I would hope my mentioning moto made it clear my comment was about having an S3 implementation for testing. Presumably one should not expose moto to users, either

1y agoHN ↗

I thank goodness I have access to a non-stupid Terraform state provider[1] so I've never tried that S3+dynamodb setup but, if I understand the situation correctly, introducing Yet Another AWS Service ™ into this mix would mandate that callers also be given a `dynamo:WriteSomething` IAM perm, which is actually different from S3 in that in S3 one can -- at their discretion -- set the policies on the bucket such that it would work without any explicit caller IAM

1: https://docs.gitlab.com/ee/user/infrastructure/iac/terraform...

1y agoHN ↗

Yeah, it might still be possible to implement a mutex based on just the existence of an object, but it'll be harder to add expiration/liveness which I find essential.

1y agoHN ↗

S3 recently got conditional writes and you can use do locking entirely in S3 - I don't think they are using this though. Must be too recent an addition.

1y agoHN ↗

Amazon has deprecated Amazon Code Commit, so this may be an interesting alternative.

1y agoHN ↗

In what use case it can be interesting alternativd?

Limited access control (e.g. CI pass required), so not very useful for end users. For machine-to-machine it's an additional layer of abstraction when a regular tarball is fine.

1y agoHN ↗

This is something I was trying to implement myself. I am surprised it can be done with just an s3 bucket. I was messing with API Gateways, Lambda functions and DynamoDB tables to support the s3 bucket. It didn't occur to me to implement it client side. I might have stuck a bit too much to the lfs test server implementation. https://github.com/git-lfs/lfs-test-server

1y agoHN ↗

how does it handle incremental changes? If it’s writing your entire repo on a loop, I could see why AWS would promote it.

1y agoHN ↗

thanks that's why i enjoy hackernews. great help

1y agoHN ↗

For the LFS part there is also dvc which works better than git-lfs and natively supports S3.

1y agoHN ↗

I haven't heard of dvc, so I had to google it, which took me to: https://dvc.org/

But I'm still confused as to what is dvc is after a cursory glance at their homepage.

1y agoHN ↗

It was on the front page contemporaneously with this comment that recommended it, so you know it was an unbiased recommendation. :)

1y agoHN ↗

There is also git-annex, which supports S3 as well as a bunch of other storage backends (and it is very easy to implement your own, it just has to loosely resemble a key-value store). Git-annex can use any of its special remotes as git remotes, like what the presented tool does for just S3.

1y agoHN ↗

Wow, AWS really wants to get rid of CodeCommit.

1y agoHN ↗

Just remember, the mininum billing increment for file size is 128KB in real AWS S3. So your Git repo may be a lot more expensive than you would think if you have a giant source tree full of small files.

1y agoHN ↗

That 128KB only applies to non-standard S3 storage tiers (glacier, infrequent access, one zone, etc)

S3 standard, which is likely what people would use for git storage, doesn't have that minimum file size charge.

See the asterisk sections in https://aws.amazon.com/s3/pricing/

1y agoHN ↗

Thank you for highlighting that, I had remembered it wrongly.

1y agoHN ↗

also the puts are 5x as expensive as the get operations

1y agoHN ↗

How do you install this? Homebrew broke global pip install. Is there a homebrew package or something?

1y agoHN ↗

FWIW, their helpers make things pretty cheap to create new Formula by yourself

    $ brew create --python --set-license Apache-2 https://github.com/awslabs/git-remote-s3/archive/refs/tags/v0.1.19.tar.gz
    Formula name [git-remote-s3]:
    ==> Downloading https://github.com/awslabs/git-remote-s3/archive/refs/tags/v0.1.19.tar.gz
    ==> Downloading from https://codeload.github.com/awslabs/git-remote-s3/tar.gz/refs/tags/v0.1.19
    ##O=-#   #
    Warning: Cannot verify integrity of '84b0a9a6936ebc07a39f123a3e85cd23d7458c876ac5f42e9f3ffb027dcb3a0f--git-remote-s3-0.1.19.tar.gz'.
    No checksum was provided.
    For your reference, the checksum is:
      sha256 "3faa1f9534c4ef2ec130fac2df61428d4f0a525efb88ebe074db712b8fd2063b"
    ==> Retrieving PyPI dependencies for "https://github.com/awslabs/git-remote-s3/archive/refs/tags/v0.1.19.tar.gz"...
    ==> Retrieving PyPI dependencies for excluded ""...
    ==> Getting PyPI info for "boto3==1.35.44"
    ==> Getting PyPI info for "botocore==1.35.44"
    ==> Excluding "git-remote-s3==0.1.19"
    ==> Getting PyPI info for "jmespath==1.0.1"
    ==> Getting PyPI info for "python-dateutil==2.9.0.post0"
    ==> Getting PyPI info for "s3transfer==0.10.3"
    ==> Getting PyPI info for "six==1.16.0"
    ==> Getting PyPI info for "urllib3==2.2.3"
    ==> Updating resource blocks
    Please run the following command before submitting:
      HOMEBREW_NO_INSTALL_FROM_API=1 brew audit --new git-remote-s3
    Editing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/g/git-remote-s3.rb

They also support building from git directly, if you want to track non-tagged releases (see the "--head" option to create)

1y agoHN ↗

git-annex also has native support for s3.

1y agoHN ↗

I think this is more about storing the entire repository on s3, not just large files as git-lfs and git-annex are usually concerned with. But coincidentally, git-annex somewhat recently got the feature to use any of its special remotes as normal git remotes (https://git-annex.branchable.com/git-remote-annex/), including s3, webdav, anything that rclone supports, and a few more.

1y agoHN ↗

Does this work with other s3 implementations like minio?