title: Amazon S3 CLI Grants Options
body: <p>In the AWS S3 Console, you can grant permission to files for "Any Authenticated AWS User" and give "Open/Download" permissions.</p>
  
  <p>What is the CLI command to do the same?</p>
  
  <p>I already know the cp command (for uploading):</p>
  
  <pre><code>aws s3 cp filename s3://bucket/folder/filename
  </code></pre>
  
  <p>But, I can't figure out the --grants configuration and the documentation is not specific with the accepted values.</p>
  
  <p>Bonus if you can provide the rest of the accepted values for the --grants flag (e.g. View Permissions, Edit Permissions)?</p>
  
  <p>Can this be done recursively?</p>
  
  <p><strong>EDIT 1</strong>
  I've found the following, however it makes the file available to EVERYONE (public).  So, where is the URI for my groups?  I'm assuming it's not the same as the group's ARN.</p>
  
  <pre><code>aws s3 cp file.txt s3://my-bucket/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
  </code></pre>
  
  <p>We can alternatively do:</p>
  
  <pre><code>aws s3 cp file.txt s3://my-bucket/ --grants full=emailaddress=user@example.com
  </code></pre>
  
  <p>That will provide full rights to the account associated with that email address.</p>
  
  <p>Still nowhere to mirror "Any Authenticated AWS User" (I am assuming this is authenticated within my account).</p>