-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-10532][EC2]Added --profile option to specify the name of profile #8696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,6 +177,9 @@ def parse_args(): | |
| parser.add_option( | ||
| "-i", "--identity-file", | ||
| help="SSH private key file to use for logging into instances") | ||
| parser.add_option( | ||
| "-p", "--profile", default="default", | ||
| help=" If you have multiple profiles, you can configure additional, named profiles by using this option (default: %default)") | ||
| parser.add_option( | ||
| "-t", "--instance-type", default="m1.large", | ||
| help="Type of instance to launch (default: %default). " + | ||
|
|
@@ -1311,7 +1314,10 @@ def real_main(): | |
| sys.exit(1) | ||
|
|
||
| try: | ||
| conn = ec2.connect_to_region(opts.region) | ||
| if opts.profile != "default": | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if I wanted to have a profile that's named "default"? I think it would better to have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM. |
||
| conn = ec2.connect_to_region(opts.region, profile_name=opts.profile) | ||
| else: | ||
| conn = ec2.connect_to_region(opts.region) | ||
| except Exception as e: | ||
| print((e), file=stderr) | ||
| sys.exit(1) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you expand this to explain what type of profile this is talking about? Like, maybe clarify whether it's an IAM or boto profile or whatever? As it stands now, I worry that this description isn't clear to people unfamiliar with this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually speaking, we can use any types of profile(AWS/boto). The remaining problem is just the loading order of these "profiles" as Jan Vlcinsky explained. I think that it is little bit long to explain that in commandline help.
I adde little modification(aws or boto config) in that help.