Search code examples
httpsamazon-s3amazon-ec2http-authenticationyum

how to use a private yum repo on amazon-s3 to provision amazon-ec2 instances?


My fantasy is to be able to spin up a standard AMI, load a tiny script and end up with a properly configured server instance.

Part of this is that I would like to have a PRIVATE yum repo in S3 that would contain some proprietary code.

It seems that S3 wants you to either be public or use AMZN's own special flavor of authentication.

Is there any way that I can use standard HTTPS + either Basic or Digest auth with S3? I'm talking about direct references to S3, not going through a web-server to get to S3.

If the answer is 'no', has anyone thought about adding AWS Auth support to yum?


Solution

  • You can certainly use Amazon S3 to host a private Yum repository. Instead of fiddling with authentication, you could try a different route: limit access to your private S3 bucket by IP address. This is entirely supported, see the S3 documentation.

    A second option is to use a Yum plug-in that provides the necessary authentication. Seems like someone already started working on such a plug-in: https://github.com/cgbystrom/yum-s3-plugin.