aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/aws-iam-tools.rb
blob: 06ad76ba5d22fd2a2ebdd6ca50c00896af3b5ce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'formula'

# Require ec2-api-tools to get the base class
require "#{File.dirname __FILE__}/ec2-api-tools.rb"

class AwsIamTools < AmazonWebServicesFormula
  url 'http://awsiammedia.s3.amazonaws.com/public/tools/cli/latest/IAMCli.zip'
  homepage 'http://developer.amazonwebservices.com/connect/entry.jspa?externalID=4143&categoryID=322'
  version "1.3.0"
  md5 'b39871a93b5e9e3d9e9a072f84814a42'

  def install
    standard_install
  end

  def caveats
    <<-EOS.undent
      Before you can use these tools you must export some variables to your $SHELL
      and create a file containing your aws credentials.

      You can access your AWS access ID and AWS secret key:
      http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key

      You must create the file $HOME/.aws-credentials-master, here is a template:

      # Enter the AWS Keys without the < or >
      # You can either use the AWS Accounts access keys and they can be found at
      # http://aws.amazon.com under Account->Security Credentials
      # or you can use the access keys of a user created with IAM
      AWSAccessKeyId=<Write your AWS access ID>
      AWSSecretKey=<Write your AWS secret key>

      To preserve your credentials don't forget to:
      chmod 600 $HOME/.aws-credentials-master

      To export the needed variables, add them to your dotfiles.
        * On Bash, add them to `~/.bash_profile`.
        * On Zsh, add them to `~/.zprofile` instead.

      export JAVA_HOME="$(/usr/libexec/java_home)"
      export AWS_IAM_HOME="#{prefix}/jars"
      export AWS_CREDENTIAL_FILE=$HOME/.aws-credentials-master
    EOS
  end
end