presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java/GlueHiveMetastore/getAwsCredentialsProvider
class GlueHiveMetastore:    private static AWSCredentialsProvider getAwsCredentialsProvider(GlueHiveMetastoreConfig config)
    {
        if (config.getAwsAccessKey().isPresent() && config.getAwsSecretKey().isPresent()) {
            return new AWSStaticCredentialsProvider(
                    new BasicAWSCredentials(config.getAwsAccessKey().get(), config.getAwsSecretKey().get()));
        }
        if (config.isUseInstanceCredentials()) {
            return InstanceProfileCredentialsProvider.getInstance();
        }
        if (config.getIamRole().isPresent()) {
            return new STSAssumeRoleSessionCredentialsProvider
                    .Builder(config.getIamRole().get(), "presto-session")
                    .build();
        }
        if (config.getAwsCredentialsProvider().isPresent()) {
            return getCustomAWSCredentialsProvider(config.getAwsCredentialsProvider().get());
        }
        return DefaultAWSCredentialsProviderChain.getInstance();
    }