JeremyGrosser / tablesnap

Uses inotify to monitor Cassandra SSTables and upload them to S3
BSD 2-Clause "Simplified" License
181 stars 86 forks source link

Allow an S3 region to be specified #70

Closed russss closed 7 years ago

russss commented 7 years ago

This change allows a specific S3 region to be passed to tablesnap. The default remains us-east-1 (a.k.a. us-standard).

This is especially important if your Cassandra nodes are in a private VPC subnet behind a NAT gateway. Bandwidth through a NAT gateway, I recently found out, costs a lot of money so it's prudent to communicate with S3 through a VPC Endpoint.

VPC endpoints are only used if your bucket is in the same region and you're communicating directly with the local S3 endpoint, so it's preferable to be quite sure this is the case.

It's possible that Boto does this automatically in later versions, but I couldn't make it reliably work in my testing. I enjoy the peace of mind that an explicit setting provides, when the alternative is NAT gateway bills.