Previously, I synced everything and then updated the Cache-Control headers in subsequent passes.
Now, I use multiple sync commands that explicitly set the desired Cache-Control headers each time.
I also added the ability to specify the staging directory on the local filesystem and the S3 bucket with environment variables (defaulting to my personal values).
As a reminder, the arguments are:
--nopreserve: disable save of filesystem attributes in s3 metadata
--cf-invalidate: invalidate the uploaded file[s] in Cloudfront
--add-header=…: explicitly set the cache control headers on the uploaded files