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