AMI is a complete machine image which typically includes the OS and the application with the configuration settings. The AMI runs on a hypervisor like Xen. This type of virtualization is heavy and requires running of the OS multiple times on the same piece of hardware which is not really that efficient.
On the other side, Docker images contain the application and its dependencies and not the OS. So, the Docker images are lightweight compared to the AMI. The Docker Images run on the Docker runtime, while the AMI runs on the hypervisors like Xen and VMWare vSphere.