library/Storage/Adapter/Cdn/AmazonAdapterAbstractFactory.php
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        $config = $this->getConfig($serviceLocator)[$requestedName];

        $storage = new AmazonAdapter(
             $serviceLocator->get($config['s3_client']),
             $serviceLocator->get($config['cloud_front_client'])
        );

        $nameStrategyConfig = [];
        if (isset($config['name_strategy_config'])) {
            $nameStrategyConfig = $config['name_strategy_config'];
        }
        return $storage->setNameStrategy(
            $serviceLocator->get(NameStrategyManager::class)->get(($config['name_strategy']), $nameStrategyConfig)
        );
    }
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        $config = $this->getConfig($serviceLocator)[$requestedName];

        $storage = new AmazonAdapter(
             $serviceLocator->get($config['s3_client']),
             $serviceLocator->get($config['cloud_front_client'])
        );

        $nameStrategyConfig = [];
        if (isset($config['name_strategy_config'])) {
            $nameStrategyConfig = $config['name_strategy_config'];
        }
        return $storage->setNameStrategy(
            $serviceLocator->get(NameStrategyManager::class)->get(($config['name_strategy']), $nameStrategyConfig)
        );
    }
Create service with name

@param ServiceLocatorInterface $serviceLocator
@param string $name
@param string $requestedName
@return StorageInterface