curl -i -X PUT -H "Content-Type:application/pdf" --data-binary "@ar-2016.pdf" https://s3-8it.s3.amazonaws.com/ar-2016.pdf?AWSAccessKeyId={awsaccesskeyid}&Content-Type=application%2Fpdf&Expires=1533263152&Signature=sH8FfRI35Do6QxrQxhP1rwhqP9c%3D
In the example above, -i prints out all the headers so that you can see what's going on, and -X POST makes it explicit that this is a post. Both of these can be safely omitted without changing the behaviour on the wire. The path to the file needs to be preceded by an @ symbol, so curl knows to read from a file. - Marian stackoverflow 2018 https://stackoverflow.com/questions/6408904/send-post-request-with-data-specified-in-file-via-curl