I don't think your database is depends on AMI available in AWS. You can use any kind of AMI. For example, you can use RedHat, Ubuntu etc for Linux system. But if you need only database then you can use Amazon RDS service. To know more about it you can go through the below given link.
Hope this will give you some idea.