gebn / gebn.co.uk

Personal website
https://gebn.co.uk
0 stars 0 forks source link

Only upload the minimum amount necessary to S3 #6

Closed gebn closed 7 years ago

gebn commented 7 years ago

Given a checkout and an S3 bucket, only upload the changes. --size-only is not optimal, as the contents may still have changed. Timestamps would be the best way, as the aws tool understands these.

In the case of prod, once you know what's changed, you can invalidate the bare minimum in CloudFront and Cloudflare (#5).

gebn commented 7 years ago

This is tricky: metadata is only set on updated files. If a file does not change between versions, it will have the old commit and version info. Further, it is immutable, so the only way to change it is to do a COPY. It's probably just worth ignoring metadata entirely.