Install AWS CLI, S3cmd and Terraform:
brew tap hashicorp/tap brew install awscli hashicorp/tap/terraform s3cmd
aws configure. Use profiles, don't setup default credentials. If
you want to stop tying
--profile then use
Manually sync website files
Terraform might update the website bucket if you mark that resource as tainted, but it is probably easier to just do the command yourself.
s3cmd sync --no-preserve --cf-invalidate --cf-invalidate-default-index --delete-removed --exclude=* --rinclude-from=dist-files ./ s3://rob-gant-ninja/
s3cmd sync preserves file attributes as metadata on the s3 key and that
data is then converted into an HTTP header in the response. Using
won't impact the ability of sync to check
for changed files.
When we build the website we should be able to cachebust the asset/css/img/js file
names using a hash and we won't need
Should also setup Cache-Control Headers once we have cachebusting setup.