Example 1: Adding an ACL to an object by using a canned ACL

Here’s a sample PUT request that adds a canned ACL to the object named AcctgBestPractices.doc. The ACL grants read permission to all users.

Request with s3curl command line

./s3curl.pl --id=lgreen --put ~ -- -k
     "https:// finance.europe.hcp.example.com/AcctgBestPractices.doc?acl"
     -H "x-amz-acl: public-read"

Request headers

PUT /AcctgBestPractices.doc?acl HTTP/1.1
Host: finance.europe.hcp.example.com
Date: Fri, 07 February 2020 17:19:26 +0000
Authorization: AWS bGdyZWVu:C8KpGuK62B7j2US0kN0Bl0Wx48k=
x-amz-acl: public-read

Response headers

HTTP/1.1 200 OK
Date: Fri, 07 February 2020 17:19:26 GMT
Content-Length: 0

© 2015, 2020 Hitachi Vantara LLC. All rights reserved.