Expand my Community achievements bar.

SOLVED

Can't fetch AEM cloud assets out the DAM on our authoring instance.

Avatar

Level 1

If I try to fetch an image or JSON file from the DAM on our author instance I get an error loading the image or a blank JSON file

 

https://author-{aemEnv}.adobeaemcloud.com/content/dam/{folder}/image.png
 
However if I do the same thing from our publish instance I can retrieve the contents no problem
 
https://publish-{aemEnv}.adobeaemcloud.com/content/dam/{folder}/image.png
 
What is the proper way to fetch assets out of the DAM? ideally the same for both to simplify the code...
Or is it possible to allow the authoring instance to serve files from a specific DAM folder similar to publish?
 
 
1 Accepted Solution

Avatar

Correct answer by
Level 6

@devvex nopes, thats not how AEM works. Authoring server is secured, usually behind firewall, loads heavier cms toosl, slow, and cannot be publicly accessed. External sites are expected to hit pub only. 

 

If you are AEMaaCS, there is Preview server. Its parallel publish instance, excatly designed for your usecase, to preview first before publishing to prod. 

Second option is to setup non-prod lower environments in aem similar to ur external applications. But there is authoring overhead, should upload assets to lower env first then redo in prod. 

 

either case, external sites should not point author. Now technically there are backdoors, disable security, cors, allow external traffic into author. But is not recommended. 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi, 

Usually, access to such resources in AEM is blocked through the dispatcher. If you are getting a 404 error, it is most likely due to that. I don't fully understand your question. Typically, you would use assets from AEM in an image tag by referencing the asset path, not the entire URL. It would look something like this:

<img src="/content/dam/wknd-shared/en/adventures/whistler-mountain-biking/adobestock-122578479.jpeg">

If you are trying to access assets from an external system (not AEM) then you should always use the assets from the publish instance.

 

Hope this helps.



Esteban Bustamante

Avatar

Level 1

Yes, apologies I should have mentioned that I am trying to access our DAM assets from an external site. The goal is to have our dev and staging environments using the authoring instance's DAM assets and production using publishing. This will allow us to get a good sense of what the environments will look like and make it quickly editable, then when ready we can publish and have the same result in production.  

 

Thanks.

Avatar

Correct answer by
Level 6

@devvex nopes, thats not how AEM works. Authoring server is secured, usually behind firewall, loads heavier cms toosl, slow, and cannot be publicly accessed. External sites are expected to hit pub only. 

 

If you are AEMaaCS, there is Preview server. Its parallel publish instance, excatly designed for your usecase, to preview first before publishing to prod. 

Second option is to setup non-prod lower environments in aem similar to ur external applications. But there is authoring overhead, should upload assets to lower env first then redo in prod. 

 

either case, external sites should not point author. Now technically there are backdoors, disable security, cors, allow external traffic into author. But is not recommended.