Example 2: Creating a bucket with an ACL

Here’s a sample PUT request that creates a bucket named human-resources and adds an ACL to the bucket. The ACL grants read permission to all users and write permission to the users with usernames mwhite and pdgrey.

Request with s3curl command line

./s3curl.pl --id=lgreen --createBucket -- -k
     "https://human-resources.europe.hcp.example.com"
     -H "x-amz-grant-read: emailAddress=all_users"
     -H "x-amz-grant-write: emailAddress=mwhite, emailAddress=pdgrey"

Request headers

PUT / HTTP/1.1
Host: human-resources.europe.hcp.example.com
Date: Fri, 07 February 2020 17:19:26 +0000
Authorization: AWS bGdyZWVu:0WCfi79j2QtCczA6TGutnJWNRm4=
x-amz-grant-read: emailAddress=all_users
x-amz-grant-write: emailAddress=mwhite, emailAddress=pdgrey
Content-Length: 0

Response headers

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

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