As the question implies I want to change/set some HTTP headers for a single object in a S3 bucket via CLI. This is what I have tried so far:
aws s3 sync --delete --acl public-read --cache-control \ max-age=31536000 --expires "Mon, 01 Oct 2035 20:30:00 GMT" \ js/jquery-blockui/jquery.blockUI.min.js \ s3://mybucket/js/jquery-blockui/jquery.blockUI.min.js --dryrun
The problem is, that
aws s3 sync tells me that he could not find the file
/home/user/somedir/js/jquery-blockui/jquery.blockUI.min.js/ (see the last slash - the file DOES exist actually) on my file system:
warning: Skipping file /home/user/somedir/js/jquery-blockui/jquery.blockUI.min.js/. File does not exist.
aws s3 sync does only expect a directory to be passed as the source? Does anyone has an idea, how to do that for a single file? I want to write a script and pass some files, which need to be altered - that's why I am asking. Thanks.