protected function s3Adapter(): AwsS3Adapter
    {
        if (isset(self::$adapters['s3'])) {
            return self::$adapters['s3'];
        }

        $config       = $this->app->config()['filesystem']['adapters']['s3'];
        $clientConfig = [
            'credentials' => [
                'key'    => $config['key'],
                'secret' => $config['secret'],
            ],
            'region'      => $config['region'],
            'version'     => $config['version'],
        ];

        self::$adapters['s3'] = new AwsS3Adapter(
            new S3Client($clientConfig),
            $config['bucket'],
            $config['dir']
        );

        return self::$adapters['s3'];
    }