Add AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

This commit is contained in:
Justin Campbell 2013-06-29 09:32:07 -04:00
parent 382fcef248
commit d66c3d86ee
1 changed files with 8 additions and 0 deletions

View File

@ -58,10 +58,18 @@ func (b *Builder) Prepare(raws ...interface{}) error {
} }
} }
if b.config.AccessKey == "" {
b.config.AccessKey = os.Getenv("AWS_ACCESS_KEY_ID")
}
if b.config.AccessKey == "" { if b.config.AccessKey == "" {
b.config.AccessKey = os.Getenv("AWS_ACCESS_KEY") b.config.AccessKey = os.Getenv("AWS_ACCESS_KEY")
} }
if b.config.SecretKey == "" {
b.config.SecretKey = os.Getenv("AWS_SECRET_ACCESS_KEY")
}
if b.config.SecretKey == "" { if b.config.SecretKey == "" {
b.config.SecretKey = os.Getenv("AWS_SECRET_KEY") b.config.SecretKey = os.Getenv("AWS_SECRET_KEY")
} }