I have a static site that I am deploying to s3
and then using CloudFront
to distribute to users. After I build the site, I want to push the new build to s3
. I found 2 approaches to do that.
aws s3 cp --recursive ./public/ s3://bucket-name --cache-control 'public, max-age=300, s-maxage=31536000'
aws s3 sync --delete ./public/ s3://bucket-name --cache-control 'public, max-age=300, s-maxage=31536000'
I am planning to deploy once or twice every week.
I want to know which of these is less expensive (money)? To be more clear, I want to know which among these will cost me less in the long run?
I tried reading the docs, but I was not able to figure out the differences. Please help me with this.