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

Can't use machine credentials. #39

Open
smithamax opened this issue Sep 6, 2017 · 4 comments
Open

Can't use machine credentials. #39

smithamax opened this issue Sep 6, 2017 · 4 comments

Comments

@smithamax
Copy link

Because of the way the aws keys/profile are being validated, the aws-sdk can't fall back to the credentials in the aws config file, or ec2 role.

@joshdholtz
Copy link
Member

@smithamax I believe this support was added in #35 but I am not super familiar with these approaches. If you could provide me with some more exact details I can work on this when I get some time or if you would like to help, a PR would be greatly appreciated ❤️

@smithamax
Copy link
Author

So that works for aws config files if you're using profiles , but it doesn't for ec2 roles. ec2 role credentials are obtained by the sdk over a link-local address. You might be able to add profiles on top but I've never done that.

If you want to test it out locally you could use aws-vault like...

aws-vault exec --server my-profile -- fastlane ios s3_upload_lane

I'm not really that familiar with ruby, but I think you should just be able to omit these lines completly and have the aws-sdk worry about if it has credentials or not.

unless s3_profile
  UI.user_error!("No S3 access key given, pass using `access_key: 'key'` (or use `aws_profile: 'profile'`)") unless s3_access_key.to_s.length > 0
  UI.user_error!("No S3 secret access key given, pass using `secret_access_key: 'secret key'` (or use `aws_profile: 'profile'`)") unless s3_secret_access_key.to_s.length > 0
end

@joshdholtz
Copy link
Member

@smithamax Thanks for info! Will take a look at 💪

@svanzoest
Copy link

this maybe addressed by #55

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

3 participants