Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!
SOLVED

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

Avatar

Level 4

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>

sankarr26533925_0-1735568802220.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@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

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@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

Avatar

Community Advisor

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