[AEM 6.5 OnPrem] Seeing lot of dependency issues while using AWS SDK Java 2.0 for S3 file read | Community
Skip to main content
Level 3
December 30, 2024
Solved

[AEM 6.5 OnPrem] Seeing lot of dependency issues while using AWS SDK Java 2.0 for S3 file read

  • December 30, 2024
  • 2 replies
  • 685 views

I am trying to use AWS SDK Java 2.0 for S3 file read inside AEM servlet. I am using embed-dependency concept of maven-bundle-plugin. Able to read S3 file with the below three AWS dependencies in standalone maven project. However it is throwing lot of dependency issues while using with AEM. Has anyone implemented it on AEM successfully ?

 

<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.21.0</version> <!-- Check for the latest version -->
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>auth</artifactId>
<version>2.21.0</version> <!-- Check for the latest version -->
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</artifactId>
<version>2.21.0</version> <!-- Check for the latest version -->
</dependency>

 

Best answer by AMANATH_ULLAH

@sankarr26533925 

Create a new module similar to core and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

Below article mentions approach to embed AWS dependency in AEM 6.5

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

2 replies

AMANATH_ULLAH
Community Advisor
AMANATH_ULLAHCommunity AdvisorAccepted solution
Community Advisor
December 31, 2024

@sankarr26533925 

Create a new module similar to core and include dependencies in it.

Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin

Below article mentions approach to embed AWS dependency in AEM 6.5

https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

Amanath Ullah
EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 31, 2024

Hi,

 

It seems that the dependencies are not being embedded correctly, which is why they are unavailable at runtime, resulting in the error you're seeing. I recently wrote a blog post that explains how to properly embed external dependencies, depending on the bundle plugin you're using. You can check it out here: https://www.oshyn.com/blog/customize-aem-for-max-value 

 

I hope this helps!

Esteban Bustamante