README.md in aws_su-0.1.0 vs README.md in aws_su-0.1.1
- old
+ new
@@ -1,16 +1,16 @@
# AwsSu
-AwsSu is a gem developed for a specific use case, where the user has an ID setuo in an AWS master account and wants to
+AwsSu is a gem developed for a specific use case, where the user has an ID setup in an AWS master account and wants to
assume a role in another account that they have permission to assume.
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'aws_su'
+ gem 'aws_su'
```
And then execute:
$ bundle
@@ -23,19 +23,23 @@
Implemented as a Ruby Module, the gem can be included into any class that needs to authenticate and assume
a role prior to calling one of the aws client methods like so:
```ruby
-require 'aws_su'
-
-class Runner
- include AwsSu
-end
-
-runner = Runner.new
-runner.authenticate('my-profile')
-runner.ec2_client.describe_vpcs
+ require 'aws_su'
+
+ class RunAwsSu
+ include AwsSu
+ end
+
+ run_aws_su = RunAwsSu.new
+ run_aws_su.authenticate(
+ profile: 'ds-nonprod',
+ duration: '28800',
+ region: 'eu-west-2'
+ )
+ run_aws_su.ec2_client.describe_vpcs
```
The gem expects to find the standard aws secrets files:
- ~/.aws/credentials
@@ -49,31 +53,38 @@
```
And the latter containing the details of the role to be assumed:
```
-[profile my-profile]
-source_profile=master
-mfa_serial=arn:aws:iam::1234567890:mfa/bradley.atkins@bjss.com
-role_arn=arn:aws:iam::1234567890:role/MY-NONPROD-TESTER-ROLE
+ [profile my-profile]
+ source_profile=master
+ mfa_serial=arn:aws:iam::1234567890:mfa/bradley.atkins@bjss.com
+ role_arn=arn:aws:iam::1234567890:role/MY-NONPROD-TESTER-ROLE
```
AwsSu also configures the current shell with the necessary environment variables to allow system calls to
be made without further authentication:
```ruby
-system('aws ec2 describe-vpcs --region eu-west-2')
+ system('aws ec2 describe-vpcs --region eu-west-2')
```
+Clients currently supported are:
+
+- ec2_client
+- elb_client
+- iam_client
+- sqs_client
+
## 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).
## Contributing
-Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aws_sudo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
+Bug reports and pull requests are welcome on GitHub at [The Github Repository](https://github.com/museadmin/aws_su). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).