title: private yum/rpm repository in AWS S3 with basic authentication
body: <p>I need to create a yum repository. I want to store the files in S3 because: A) we already have a ton of files there; and B) because price is not bad (according to some definition of "not bad").</p>
  
  <p>The repository needs to be private - yum clients will need to provide some kind of credentials to access it.</p>
  
  <p>yum allows you to use Basic HTTP Authentication for private repos:</p>
  
  <pre><code>baseurl=https://user:pass@s3-site.whatever.com
  </code></pre>
  
  <p>I could enable Static Website Hosting on an S3 bucket, but it doesn't seem to support Basic Auth.</p>
  
  <p>There's a yum plugin called <a href="https://github.com/seporaitis/yum-s3-iam" rel="nofollow">yum-s3-iam</a> that allows you to setup access control based on the IAM role of the instance where yum is running, but this only works with instances in Amazon.</p>
  
  <p>I could create a front-end instance, mount the S3 bucket to it with <a href="https://github.com/s3fs-fuse/s3fs-fuse" rel="nofollow">s3fs</a>, install Apache with Basic Auth, but this would require running that front-end, which I'm trying to avoid (I want to reduce the number of moving parts).</p>
  
  <p>Then there's the <a href="http://www.yegor256.com/2014/04/21/s3-http-basic-auth.html" rel="nofollow">s3auth</a> proxy which basically does the same thing, but at a higher level. It still requires a front-end instance.</p>
  
  <p>Is there a better solution, something that avoids the need to create a front-end instance?</p>