boskos/common/aws/common.go
func GetAWSCreds(r *common.Resource) (credentials.Value, error) {
	val := credentials.Value{}

	if r.Type != ResourceType {
		return val, fmt.Errorf("Wanted resource of type %q, got %q", ResourceType, r.Type)
	}

	accessKey, ok := r.UserData.Map.Load(UserDataAccessIDKey)
	if !ok {
		return val, errors.New("No Access Key ID in UserData")
	}
	secretKey, ok := r.UserData.Map.Load(UserDataSecretAccessKey)
	if !ok {
		return val, errors.New("No Secret Access Key in UserData")
	}

	val.AccessKeyID = accessKey.(string)
	val.SecretAccessKey = secretKey.(string)

	return val, nil

}
func GetAWSCreds(r *common.Resource) (credentials.Value, error) {
	val := credentials.Value{}

	if r.Type != ResourceType {
		return val, fmt.Errorf("Wanted resource of type %q, got %q", ResourceType, r.Type)
	}

	accessKey, ok := r.UserData.Map.Load(UserDataAccessIDKey)
	if !ok {
		return val, errors.New("No Access Key ID in UserData")
	}
	secretKey, ok := r.UserData.Map.Load(UserDataSecretAccessKey)
	if !ok {
		return val, errors.New("No Secret Access Key in UserData")
	}

	val.AccessKeyID = accessKey.(string)
	val.SecretAccessKey = secretKey.(string)

	return val, nil

}
// GetAWSCreds tries to fetch AWS credentials from a resource