I have a plugin which is being activated correctly, but I’m having issues implementing the AWS SDK to upload the file to S3, I’m pretty new to Java so I’m not really sure what this error could be an indication of, as far as I can tell my code is all correct…
The exact error
java.lang.reflect.InvocationTargetException|at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)|at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|at java.lang.reflect.Method.invoke(Method.java:483)|at com.wowza.wms.module.ModuleFunction.invoke(ModuleFunction.java:48)
My code…
String bucketName = "m***";
String myAccessKeyID = "AKI*******";
String mySecretKey = "K6n****";
String keyName = "recorded/"+fileName;
BasicAWSCredentials myCredentials = new BasicAWSCredentials(myAccessKeyID, mySecretKey);
getLogger().info("Passed credentials"); // Logs ok
// This line is where it breaks
AmazonS3 s3client = new AmazonS3Client(myCredentials);
getLogger().info("Passed client"); // Never reaches here
s3client.putObject(new PutObjectRequest(bucketName, keyName, file));