In python module troposphere I am getting an error "AttributeError: 'module' object has no attribute 'EBSBlockDeviceMapping'"
Question: I'm following the example of some other code that has been written. The code
in question looks like this:

    
    
       if virtualname == "ebs":
            if deviceSize == None:
                deviceSize = 8
    
                if delOnTerminate == None or delOnTerminate == "true":
                    DOT = "true"
                else:
                    DOT = "false"
    
            lc.BlockDeviceMappings.append(ec2.EBSBlockDeviceMapping(
                                                DeviceName=blockname,
                                                Ebs=ec2.EBSBlockDevice(VolumeSize=deviceSize,
                                                                       DeleteOnTermination=DOT)))
        else:
            lc.BlockDeviceMappings.append(ec2.BlockDeviceMapping(DeviceName=blockname,
                                                                 VirtualName=virtualname))
    


Answer: The `AttributeError` happens only when you have a class (in this case a
module) and refer to an attribute that doesn't exist. It is like a `NameError`
but for attributes of objects.

You have imported a module like `import ... as ec2`. The module marked `...`
does not have a function called `EBSBlockDeviceMapping`, so when you call it
in your code, it gives an `AttributeError`.

