private static function remoteCredentialProviders(array $config = [])
    {
        if (!empty(getenv(EcsCredentialProvider::ENV_URI))) {
            $providers['ecs'] = self::ecsCredentials($config);
        }
        $providers['instance'] = self::instanceProfile($config);

        if (isset($config['credentials'])
            && $config['credentials'] instanceof CacheInterface
        ) {
            foreach ($providers as $key => $provider) {
                $providers[$key] = self::cache(
                    $provider,
                    $config['credentials'],
                    'aws_cached_' . $key . '_credentials'
                );
            }
        }

        return $providers;
    }
private static function remoteCredentialProviders(array $config = [])
    {
        if (!empty(getenv(EcsCredentialProvider::ENV_URI))) {
            $providers['ecs'] = self::ecsCredentials($config);
        }
        $providers['instance'] = self::instanceProfile($config);

        if (isset($config['credentials'])
            && $config['credentials'] instanceof CacheInterface
        ) {
            foreach ($providers as $key => $provider) {
                $providers[$key] = self::cache(
                    $provider,
                    $config['credentials'],
                    'aws_cached_' . $key . '_credentials'
                );
            }
        }

        return $providers;
    }
private static function remoteCredentialProviders ( array $ config = [ ] ) { if ( ! empty ( getenv ( EcsCredentialProvider :: ENV_URI ) ) ) { $ providers [ 'ecs' ] = self :: ecsCredentials ( $ config ) ; } $ providers [ 'instance' ] = self :: instanceProfile ( $ config ) ; if ( isset ( $ config [ 'credentials' ] ) && $ config [ 'credentials' ] instanceof CacheInterface ) { foreach ( $ providers as $ key => $ provider ) { $ providers [ $ key ] = self :: cache ( $ provider , $ config [ 'credentials' ] , 'aws_cached_' . $ key . '_credentials' ) ; } } return $ providers ; }
Remote credential providers returns a list of credentials providers
for the remote endpoints such as EC2 or ECS Roles.

@param array $config Array of configuration data.

@return array
@see Aws\Credentials\InstanceProfileProvider for $config details.
@see Aws\Credentials\EcsCredentialProvider for $config details.
Remote credential providers returns a list of credentials providers for the remote endpoints such as EC2 or ECS Roles .