Skip to content
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

Add option to use IAM roles instead of AK/SK #14

Closed
SamVerschueren opened this issue Jul 31, 2015 · 3 comments
Closed

Add option to use IAM roles instead of AK/SK #14

SamVerschueren opened this issue Jul 31, 2015 · 3 comments
Assignees

Comments

@SamVerschueren
Copy link
Contributor

First of all, thanks for the plugin! Works very well.

I am hosting my Jenkins server on an ec2 instance, like probably most of the people that will use this plugin. I think it would be great to leverage the IAM role assigned to the Jenkins EC2 instance to allow the plugin to deploy AWS Lambda functions.

The S3 Plugin for example, allows u to use IAM Roles. It's just a simple checkbox which will hide the Access Key and Secret Key input boxes.

@cast cast self-assigned this Jul 31, 2015
@cast
Copy link
Contributor

cast commented Jul 31, 2015

Hi Sam,

Thanks for the feedback!

I'll definitely take this as a feature request. We use the plugin on a managed Jenkins so we didn't get to this yet.

@cast
Copy link
Contributor

cast commented Aug 6, 2015

In the next version 0.2.5 the checkbox is added (doesn't hide the fields yet though).

It uses the DefaultAWSCredentialsProviderChain, so it will take in account in the given order:

  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY(_ID)
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • Instance profile credentials delivered through the Amazon EC2 metadata service

It'll be available tomorrow through the update center.

@cast cast closed this as completed Aug 6, 2015
@SamVerschueren
Copy link
Contributor Author

Hi Michael

Thank you very much! Works like a charm.

Some minor remarks that can be fixed in the future (will create a new issue for these)

  1. Remove the fields if checkbox is checked (as you mentioned yourself)
  2. Do not show errors on the AK/SK fields if the checkbox is checked (but will probably be the case automatically if 1 is implemented)

Thanks again!
Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants