Access AWS S3 from AEM | Community
Skip to main content
Level 2
Jan 29, 2018 10:02 AM UTC

Access AWS S3 from AEM

I am creating the sitemap file within the AEM and upload to the S3 bucket. I have tried to use normal AWS sdk and osgi version, but both end up with same issue, when I try to run the upload.

java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.AmazonS3Client

I have definitely imported the AWS sdk package into my module, however, it is still unable to find it when it is called, though other class in the same package seems to be able to be found. ie. Class.forName("com.amazonaws.services.s3.KeyWrapException") is working fine.

Is there something from AEM to restrict the loading of Client classes?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

VeenaVikraman
New Participant
Jan 29, 2018 4:34 PM UTC

As far as I know it don't , but are you sure com.amazonaws.services.s3.AmazonS3Client class is available in your felix console for import ? Which bundle is importing these classes ? While I was working on a similar usecase , I had to make an OSGI bundle from the AWS jar and install separately in FELIX to export all the classes. Are you sure you are not missing this class ?

Translate
smacdonald2008
Level 10
Jan 29, 2018 4:21 PM UTC

Are you following AEM online docs?

Translate
brolinukAuthor
Level 2
Jan 30, 2018 9:51 AM UTC

I have read the s3 data store bit online, but it seems not giving me everything I was looking for, such as download file and calling at s3 at a specific time etc. Please let me know if I understand it wrong and share the link for the relevant links. Many thanks

Translate
VeenaVikraman
New Participant
Jan 30, 2018 3:45 PM UTC

What I can possibly do is to try write a sample code on how We have achieved it ? I might need some time though.

Translate