README.md in aws_su-0.1.1 vs README.md in aws_su-0.1.2

- old
+ new

@@ -73,9 +73,33 @@ - ec2_client - elb_client - iam_client - sqs_client +After you use the authenticator, running the AWS CLI from the command line is possible via the +assumed role if you add this function to your ~/.bashrc or ~/bash_profile file: + +``` + function awssu() { + while read line + do + export "${line}" + done < ~/.awssudo + export AWS_DEFAULT_REGION="${1:-eu-west-2}" # Change to your default region + } +``` + +If you have a valid session still available then you can enter: + +```bash + awssu eu-west-1 +``` + +The region is optional and will default to eu-west-2 unless you change the default in the function. + +This will call the function which will export the contents of the environment variables +and then you can run the CLI without further authentication. + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).