# S3 Cloudfront Migration funktioniert nicht automatisiert

**URL:** <https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213>\
**Category:** Administration\
**Created:** [20. August 2019 um 20:12 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213 "2019-08-20T20:12:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hut\_syndikat](https://avatars.discourse-cdn.com/v4/letter/h/cab0a1/32.png) [@hut\_syndikat](https://forum.shopware.com/u/hut_syndikat)\
**Post date:** [20. August 2019 um 20:12 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213/1 "2019-08-20T20:12:52Z")

</div>

Hallo Zusammen,

wir haben erfolgreich den S3 Adapter eingebaut und mit Cloudfront verknüpft.  
Wenn man nun in der Console&nbsp;

```
php bin/console sw:media:migrate --from=local --to=s3

```

ausführt, funktioniert alles wunderbar und alle Media Files kommen zu Cloudfront. Aber automatisiert (sprich upload einer Media File im Shopware Backend) wird leider gar nix zu S3 hochgeladen, trotzdem liveMigration aktiviert ist. Hier unsere config

&nbsp; &nbsp; ‚cdn‘ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; ‚backend‘ =\> ‚local‘,  
&nbsp; &nbsp; &nbsp; &nbsp; ‚strategy‘ =\> ‚md5‘,  
&nbsp; &nbsp; &nbsp; &nbsp; ‚liveMigration‘ =\> true,  
&nbsp; &nbsp; &nbsp; &nbsp; ‚adapters‘ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚local‘ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚type‘ =\> ‚local‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚mediaUrl‘ =\> ‚cloudfront URL‘  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚s3‘ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚type‘ =\> ‚s3‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚mediaUrl‘ =\> ‚S3 URL‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚bucket‘ =\> ‚xxx‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚region‘ =\> ‚eu-central-1‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚endpoint‘ =\> null,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚credentials‘ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚key‘ =\> ‚xxx‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‚secret‘ =\> ‚xxx‘,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ],  
&nbsp; &nbsp; &nbsp; &nbsp; ],  
&nbsp; &nbsp; ],

Was haben wir übersehen, hat jemand einen Tipp? Danke 🙂

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [20. August 2019 um 21:57 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213/2 "2019-08-20T21:57:34Z")

</div>

dein backend ist auch lokal und nicht s3

---

<div class="post-metadata">

**Author:** ![hut\_syndikat](https://avatars.discourse-cdn.com/v4/letter/h/cab0a1/32.png) [@hut\_syndikat](https://forum.shopware.com/u/hut_syndikat)\
**Post date:** [21. August 2019 um 17:53 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213/3 "2019-08-21T17:53:13Z")

</div>

‘cdn’ =\> [  
&nbsp; &nbsp; &nbsp; &nbsp; ‘backend’ =\> ‘s3’,

&nbsp;

? Das fixt es leider nicht. Es wird lediglich die Medien URL im Backend auf den S3 bucket geändert aber die Uploads nicht automatisch auf S3 geladen 😕

---

<div class="post-metadata">

**Author:** ![equippr](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@equippr](https://forum.shopware.com/u/equippr)\
**Post date:** [14. Oktober 2020 um 20:21 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213/4 "2020-10-14T20:21:56Z")

</div>

Hi, konntest du das lösen?

---

<div class="post-metadata">

**Author:** ![musikdiscount24](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@musikdiscount24](https://forum.shopware.com/u/musikdiscount24)\
**Post date:** [19. Oktober 2020 um 14:15 UTC](https://forum.shopware.com/t/s3-cloudfront-migration-funktioniert-nicht-automatisiert/61213/5 "2020-10-19T14:15:31Z")

</div>

Hallo,

eine funktionierende config.php, die ich in einem Testsystem einsetze,&nbsp;sieht so aus (=gt; ist größer als):

```
...

'cdn' => 
array (
	'backend' => 's3',
	'adapters' => array (
		's3' => array (
			'type' => 's3',
			'mediaUrl' => 'your-cloudfront-mediaUrl',

			'bucket' => 'your-bucket',
			'region' => 'your-region',
			'endpoint' => null,
			'credentials' => array (
				'key' => 'your-key',
				'secret' => 'your-secret',
			),
		),
	),
),

...

```

Vielleicht hilft Dir das ja.

Viele Grüße
