Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Boto has built-in support for loading multiple named accounts, use it. #12

Merged
merged 5 commits into from
Mar 24, 2015

Conversation

ashb
Copy link
Contributor

@ashb ashb commented Feb 19, 2015

This closes #1. This has two benefits:

  1. we can delete some code \o/
  2. We can store the credentials in a way compatible with AWS's own sdk/cli tools

This will cause everyone to fail with 'you don't have credentials' properly - I'll add something to the readme showing the new config format

@ashb ashb changed the title Boto has built-in support for loading multiple named accounts, use it. (WIP) Boto has built-in support for loading multiple named accounts, use it. Feb 27, 2015
@ashb
Copy link
Contributor Author

ashb commented Feb 27, 2015

I need to rebase this now. (and I have done)

@ashb ashb force-pushed the use-boto-config branch 2 times, most recently from 577cce2 to 4a14fb5 Compare March 20, 2015 11:57
@ashb ashb changed the title (WIP) Boto has built-in support for loading multiple named accounts, use it. Boto has built-in support for loading multiple named accounts, use it. Mar 23, 2015
profile_name=instance.aws_profile_name
)
return conn
except NoAuthHandlerFound:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than printing an error can you add an error class to errors.py and raise that with a message

@mattmb
Copy link
Contributor

mattmb commented Mar 23, 2015

Otherwise LGTM 👍

What shall we do about get_config? re the change here and in #45

Maybe we should rewrite it as get_aws_config, get_cf_config, get_project_config etc. PR that first, then rebase our branches? What seems like the least pain?

@SteveMarshall
Copy link
Member

@ashb Can you update the description to describe the intentions of this PR, what it might affect, and so on?

print "[ERROR] No AWS credentials"
print "Create an ~/.aws/credentials file by following this layout:\n\n" + \
" http://boto.readthedocs.org/en/latest/boto_config_tut.html#credentials"
sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we print errors to STDERR, not STDOUT?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 23a9a84 on use-boto-config into * on master*.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.26%) to 46.66% when pulling df061b0 on use-boto-config into aecbe0f on master.

@SteveMarshall
Copy link
Member

LGTM 👍

@ashb
Copy link
Contributor Author

ashb commented Mar 24, 2015

And final rebase so it merges cleanly.

mattmb added a commit that referenced this pull request Mar 24, 2015
@mattmb mattmb merged commit a38afe8 into master Mar 24, 2015
@mattmb mattmb deleted the use-boto-config branch March 24, 2015 17:07
@coveralls
Copy link

Coverage Status

Coverage increased (+0.28%) to 48.42% when pulling 68f2c07 on use-boto-config into ca77a00 on master.

sevenmachines pushed a commit that referenced this pull request Jun 22, 2015
By passing tags while creating our cloudformation stack we can
propagate these tags to our created resources, enabling easy
separation of environments for billing purposes (closes #12)
sevenmachines pushed a commit that referenced this pull request Jun 23, 2015
By passing tags while creating our cloudformation stack we can
propagate these tags to our created resources, enabling easy
separation of environments for billing purposes (closes #12)
sevenmachines pushed a commit that referenced this pull request Jun 23, 2015
By passing tags while creating our cloudformation stack we can
propagate these tags to our created resources, enabling easy
separation of environments for billing purposes (closes #12)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace custom config loading with Boto's own loading of ~/.aws/credentials
4 participants