func NewEnvConfig() (EnvConfig, error) {
	var cfg EnvConfig
	creds := aws.Credentials{
		Source: CredentialsSourceName,
	}
	setFromEnvVal(&creds.AccessKeyID, credAccessEnvKeys)
	setFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys)
	if creds.HasKeys() {
		creds.SessionToken = os.Getenv(AWSSessionTokenEnvVar)
		cfg.Credentials = creds
	}
	cfg.CredentialsEndpoint = os.Getenv(AWSCredentialsEndpointEnvVar)
	cfg.ContainerCredentialsEndpointPath = os.Getenv(AWSContainerCredentialsEndpointPathEnvVar)
	setFromEnvVal(&cfg.Region, regionEnvKeys)
	setFromEnvVal(&cfg.SharedConfigProfile, profileEnvKeys)
	cfg.SharedCredentialsFile = os.Getenv(AWSSharedCredentialsFileEnvVar)
	cfg.SharedConfigFile = os.Getenv(AWSConfigFileEnvVar)
	cfg.CustomCABundle = os.Getenv(AWSCustomCABundleEnvVar)
	return cfg, nil
}
NewEnvConfig retrieves the SDK's environment configuration.
See `EnvConfig` for the values that will be retrieved.
package external
import (
	"io/ioutil"
	"os"
	"github.com/aws/aws-sdk-go-v2/aws"
)
const CredentialsSourceName = "EnvConfigCredentials"
const (
	AWSAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID"
	AWSAccessKeyEnvVar   = "AWS_ACCESS_KEY"
	AWSSecreteAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY"
	AWSSecreteKeyEnvVar       = "AWS_SECRET_KEY"
	AWSSessionTokenEnvVar = "AWS_SESSION_TOKEN"
	AWSCredentialsEndpointEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
	AWSContainerCredentialsEndpointPathEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
	AWSRegionEnvVar        = "AWS_REGION"
	AWSDefaultRegionEnvVar = "AWS_DEFAULT_REGION"
	AWSProfileEnvVar        = "AWS_PROFILE"
	AWSDefaultProfileEnvVar = "AWS_DEFAULT_PROFILE"
	AWSSharedCredentialsFileEnvVar = "AWS_SHARED_CREDENTIALS_FILE"
	AWSConfigFileEnvVar = "AWS_CONFIG_FILE"
	AWSCustomCABundleEnvVar = "AWS_CA_BUNDLE"
)
var (
	credAccessEnvKeys = []string{
		AWSAccessKeyIDEnvVar,
		AWSAccessKeyEnvVar,
	}
	credSecretEnvKeys = []string{
		AWSSecreteAccessKeyEnvVar,
		AWSSecreteKeyEnvVar,
	}
	regionEnvKeys = []string{
		AWSRegionEnvVar,
		AWSDefaultRegionEnvVar,
	}
	profileEnvKeys = []string{
		AWSProfileEnvVar,
		AWSDefaultProfileEnvVar,
	}
)
type EnvConfig struct {
	Credentials aws.Credentials
	CredentialsEndpoint string
	ContainerCredentialsEndpointPath string
	Region string
	SharedConfigProfile string
	SharedCredentialsFile string
	SharedConfigFile string
	CustomCABundle string
}
func LoadEnvConfig(cfgs Configs) (Config, error) {
	return NewEnvConfig()
}