Using CLI (not s3cmd) to manage Amazon S3, how can I select all objects with extension .pdf and apply the content type application/pdf?
This is what I came up with so far:
aws s3 sync s3://${BUCKET_NAME} s3://${BUCKET_NAME} --dryrun --exclude '*' --include '*.pdf' --no-guess-mime-type --content-type application/pdf Using the --debug parameter I found out about this error:
An error occurred (InvalidRequest) when calling the CopyObject operation: This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes.