How to Solve NameError: name 'boto3' is not defined

Solution: Import the 'boto3' module

To Solve the error, add the following line to the top of your code.

import boto3

 

For more information:
Python boto3