In the context of AWS:
AMI is used to package software and can be deployed on EC2. Docker can also be used to package software and can also be deployed to EC2.
What's the difference between both and how do I choose between them?
An AMI is an exact image of your instance, using which more instances of the same configuration can be launched.
Docker containers are more of a packaged mini images that run on VM in a totally isolated environment.