title: How to create a folder within S3 bucket using PHP
body: <p>I'm trying to create a folder within an S3 amazon bucket but I'm finding it difficult to find the right documentation to adequately explain what is needed. I have the following code / pseudocode for creating a folder. Can anyone explain or provide a sample of the arguments I need to place within the code</p>
  
  <pre><code>use vendor\aws\S3\S3Client;
  
  $bucket_url = 'https://***.amazonaws.com/***/';
  $folder_name = $username . '/';
  
  $s3Client = new vendor\aws\S3\S3Client([
          'version' =&gt; AWS_VERSION,
          'region' =&gt; AWS_REGION,
          'credentials' =&gt; [
              'key' =&gt; AWS_KEY,
              'secret' =&gt;AWS_SECRET,
          ],
      ]);
  
      $s3Client-&gt;putObject(array(
          'Bucket' =&gt; AWS_BUCKET, // Defines name of Bucket
          'Key' =&gt; AWS_PATH . $folder_name, //Defines Folder name
          'Body' =&gt; "",
      ));
  </code></pre>