In amazon s3 for our site through s3cmd tool we uploaded around 60GB of files including mp3, jpg to a bucket. But now when we checked site slowness files are not caching and further checking we came to know that we can set
--add-header=Cache-Control:max-age=3153600 while uploading to enable cache.
So please let me know is there any option to set cache or apply
--add-header=Cache-Control to already uploaded files in Amazon s3 bucket? We can use either s3cmd tool or AMS CLI tool.
After lot of searches we came to know that there is a modify option in s3cmd latest version 1.5.0-rc1 and we added cache control to these files and given the command as follows:
s3cmd modify --recursive --acl-public --add-header="Cache-Control:max-age=2592000" s3://geo-site/webroot/
But now the files (mp3 and HTML) are not working and when we checked the metadata of files Content-Type changed to binary_octet-stream
So please let us know without changing existing metadata how we can add Cache-Control? Please help us on it.