javaaws-sdkjythonjython-2.7

ImportError: No module named amazonaws


Following is my code:-

import sys

sys.path.append("/jython_2_7-lib/lib/aws-java-sdk-1.11.920.jar")


from com.amazonaws import *
from com.amazonaws.auth import InstanceProfileCredentialsProvider
from com.amazonaws.regions import Regions
from com.amazonaws.services.s3 import *
from com.amazonaws.services.s3.model import DeleteObjectRequest

I verified that path is getting added to the sys.path by printing sys.path, I have checked couple of articles but did not help. I tried appending both jar's absolute path and just till lib directory as well.

using following jars from amazon aws sdk and version is 1.11.920:-

aws-java-sdk 
aws-java-sdk-s3

Am I missing something?


Solution

  • We need to import aws-java-sdk-core-.jar as well.

    The core jar provides all the basic classes for the s3 or auth jars.