Dynamic Media usage in AEM Cloud Local Development | Community
Skip to main content
Shubham_borole
Community Advisor
Community Advisor
June 30, 2022
Solved

Dynamic Media usage in AEM Cloud Local Development

  • June 30, 2022
  • 1 reply
  • 1851 views

Hello All,

 

We are looking to use Dynamic Media in AEM cloud and have been able to connect to Dynamic media as explained at https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/dynamicmedia/config-dm.html?lang=en

1. Has anyone seen issue below and know if its a valid scenario and a fix?

 

 

However, when trying this in local, I try to click on "Connect to Dynamic Media button" and get a message Connection Failed.

 

 

 

failed: Connection refused: connect at com.day.cq.dam.scene7.impl.Scene7APIClientImpl.makeRequest(Scene7APIClientImpl.java:278) [com.day.cq.dam.cq-scene7-core:5.13.402] Caused by: java.net.ConnectException: Connection refused: connect at java.base/java.net.PlainSocketImpl.connect0(Native Method) at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.base/java.net.Socket.connect(Socket.java:608)

 

 

 

 

2. How do AEM Cloud devs usually develop locally with Dynamic Media? i.e. In terms of account, do all devs use a same local dev account different from dev, staging and (of course) prod accounts?

We are trying to utilize Dynamic Media for getting renditions for our components. I was able to try to create image presets and get different renditions based images created when an image file is uploaded to DAM Assets. 

Now looking to see what changes need to be made in the component to load the rendition image. For eg 

https://my-aec-site/is/image/mysiteaccount-dev/myimage?img.retina-medium$ 
or 

https://my-aec-site/is/image/mysiteaccount-dev/myimage?img.retina-large$

my-aec-site can be replaced by applicable site.

Thank you,

 

Shubham

Tagging @gaurav-behl and @lokesh_shivalingaiah  for help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaurav-Behl

@shubham_borole 

  1. I am able to connect to Dynamic Media from local SDK v7767 w/o any issue. "Connection refused" could probably be due to a proxy on your local machine interfering with the connection otherwise wrong credentials/region selection.
  2. "Do all devs use a same local dev account different from dev, staging and (of course) prod accounts?" - Correct, DM is configured at application/instance/tenant level hence all devs could use the same account based on your architectural decisions. I haven't come across a use case where each dev in the same team is using a different account for some reason. However, there could be a different PROD & Non-PROD account based on your contract. Each DM account adds up to the overall licensing cost in case you're not aware of that.
  3. You may follow core components reference implementation to enable DM in your proxy/custom components - Image Component | Adobe Experience Manager

 

HTH

 

1 reply

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
July 2, 2022

@shubham_borole 

  1. I am able to connect to Dynamic Media from local SDK v7767 w/o any issue. "Connection refused" could probably be due to a proxy on your local machine interfering with the connection otherwise wrong credentials/region selection.
  2. "Do all devs use a same local dev account different from dev, staging and (of course) prod accounts?" - Correct, DM is configured at application/instance/tenant level hence all devs could use the same account based on your architectural decisions. I haven't come across a use case where each dev in the same team is using a different account for some reason. However, there could be a different PROD & Non-PROD account based on your contract. Each DM account adds up to the overall licensing cost in case you're not aware of that.
  3. You may follow core components reference implementation to enable DM in your proxy/custom components - Image Component | Adobe Experience Manager

 

HTH

 

Shubham_borole
Community Advisor
Community Advisor
July 5, 2022

Thank you @gaurav-behl 

We are looking into connectivity issue as well. Is there a way to bypass or whitelist local ip somewhere? Not sure how to work around this.

 

Tried updating below but no effect.

org.apache.sling.security.impl.ReferrerFilter
allow.hosts.regexp = [https://.*\.scene7\.com:443]

Please let me know if any thoughts. 

Thanks for the itemized answers, they were helpful.

 

Shubham 

Gaurav-Behl
Level 10
July 5, 2022

I don't think whitelisting local IP is required & would help.

Try to connect from a different m/c, if you've been trying to connect from your work machine and it didn't work, try it from your personal m/c or vice versa.

The goal is to make sure that no firewall/proxy is blocking the outgoing request on your machine. Dynamic Media's endpoint should already be integrated via your Adobe IMS & AEM servers. If not, then fix that first.