Example: Creating a folder

Here’s a sample PUT request that creates a folder named budget_proposals in the r&d folder in the finance bucket. If the r&d folder doesn’t already exist, this request also creates that folder. The request is being made while versioning is enabled for the bucket.

Note: s3curl does not support the use of the forward slash (/) as the terminator for the folder name in PUT requests to create a folder.

Request with s3curl command line

./s3curl.pl --id=lgreen --put ~ -- -k
     "https://finance.europe.hcp.example.com/r&d/budget_proposals%2F"
     -H "Content-Length:0"

Request headers

PUT /r&d/budget_proposals%2F HTTP/1.1
Host: finance.europe.hcp.example.com
Transfer-Encoding: chunked
Date: Fri, 07 February 2020 17:19:26 +0000
Authorization: AWS bGdyZWVu:VsSmWFRWwTPWPjH+QEs6Z2Qwf84=
Content-Length: 0

Response headers

HTTP/1.1 200 OK
Date: Fri, 07 February 2020 17:19:26 GMT
x-amz-version-id: 87395113368065
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Content-Length: 0

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