benbjohnson / litestream

Streaming replication for SQLite.
https://litestream.io
Apache License 2.0
11.12k stars 256 forks source link

Switch to S3 HEAD to find bucket location #580

Closed ananthb closed 7 months ago

ananthb commented 7 months ago

S3's GetBucketLocation is deprecated so switching to a HEAD request to find the bucket location.

Fixes #574.

ananthb commented 7 months ago

Not sure if the default bucket stuff is still needed. AWS S3 only says that directory buckets do not have a location associated with them.

benbjohnson commented 7 months ago

Thanks!

myisaak commented 5 months ago

This PR breaks the replicate functionality and we get again the error from #574. Reverting to previous commit removed this error.

The error:

/ # litestream restore -o test.db s3://BUCKET/PATH
2024/03/21 06:42:23 ERROR failed to run error="cannot fetch generations: cannot lookup bucket region: AccessDenied: Access Denied\n\tstatus code: 403, request id: Z9QYDYMRKTC8SRPB, host id: ..."