internal/cloud: Allow aws creds from defaults
Defaults according to https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config: Defaults to a chain of credential providers to search for credentials in environment variables, shared credential file, and EC2 Instance Roles. If nothing is specified fall back to whatever instance role.
This commit is contained in:
parent
17e809b5f7
commit
c4ecbea510
2 changed files with 9 additions and 1 deletions
|
|
@ -44,8 +44,10 @@ type OSBuildJobImpl struct {
|
|||
func (impl *OSBuildJobImpl) getAWS(region string, accessId string, secret string, token string) (*awscloud.AWS, error) {
|
||||
if accessId != "" && secret != "" {
|
||||
return awscloud.New(region, accessId, secret, token)
|
||||
} else {
|
||||
} else if impl.AWSCreds != "" {
|
||||
return awscloud.NewFromFile(impl.AWSCreds, region)
|
||||
} else {
|
||||
return awscloud.NewDefault(region)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue