How to Solve NameError: name 'S3Connection' is not defined -- boto
Solution: Import the 'S3Connection' module
To Solve the error, add the following line to the top of your code.
from boto.s3.connection import S3Connection
For more information:
Python boto S3Connection