func (e *EnvProvider) Retrieve() (Value, error) {
	id := os.Getenv("AWS_ACCESS_KEY_ID")
	if id == "" {
		id = os.Getenv("AWS_ACCESS_KEY")
	}
	secret := os.Getenv("AWS_SECRET_ACCESS_KEY")
	if secret == "" {
		secret = os.Getenv("AWS_SECRET_KEY")
	}
	if id == "" {
		return Value{ProviderName: EnvProviderName}, errors.New("AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment")
	}
	if secret == "" {
		return Value{ProviderName: EnvProviderName}, errors.New("AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment")
	}
	return Value{
		AccessKeyID:     id,
		SecretAccessKey: secret,
		ProviderName:    EnvProviderName,
	}, nil
}
Retrieve retrieves the keys from the environment.
package credentials
import (
	"errors"
	"os"
)
const EnvProviderName = "EnvProvider"
type EnvProvider struct{}
func NewEnvCredentials() *Credentials {
	return NewCredentials(&EnvProvider{})
}