I hope this helps you . So I've found the answer to this question. After a couple of days messing around I've finally figured it out. The data.py file in the nltk folder needs to be modified as follows. Basically remove the /usr/... paths and add in the folder that Lambda executes from /var/task/ and ensure that your nltk_data folder is in the root of your execution zip. Not sure why, but using the inline nltk.data.path.append() method does not work with AWS Lambda and the data.py file needs to be modified directly.
# Common locations on UNIX & OS X:
path += [
Python NLTK: Stanford NER tagger error message: NLTK was unable to find the java file
I wish this helpful for you Trying to get Stanford NER working with Python. Followed some instructions on the web, but got the error message: "NLTK was unable to find the java file! Use software specific configuration paramaters or set the JAVAHOME environment variable." What was wrong? Thank you! , Found the solution on the web. Replace the path with your own.
java_path = "C:/../../jdk1.8.0_101/bin/java.exe"
os.environ['JAVAHOME'] = java_path