title: How do I update the meta-data of a directory using aws s3 cli?
body: <p>I am attempting to use the following command in a bash script to update the x-amz-meta-uid and x-amz-meta-gid of files and folders recursively.</p>
  <p><code>aws s3 cp s3://$SOURCE_CLOUD_BUCKET_PATH s3://$DESTINATION_CLOUD_BUCKET_PATH --recursive --quiet --metadata-directive &quot;REPLACE&quot; --metadata &quot;uid=$USER_UID,gid=$USER_GID&quot;</code></p>
  <p>However, it only seems to be updating the metadata on files. How can I also get this to update the metadata on the directories/folders also?</p>
  <p><code>aws --version</code></p>
  <p><code>aws-cli/2.0.43 Python/3.7.3 Linux/5.4.0-1029-aws exe/x86_64.ubuntu.18</code></p>