I don't know whether this question is on-topic for Webmasters, but running the database and web server on the same machine leads to issues I've addressed at Database Administrators SE and Server Fault revealing repeatedly that the two tend to peak together in their demands for memory and other resources, leading to the appearance of "crashes" which are actually cases of server resource exhaustion under load rather than actual software defects.
Running them together on the same machine is not a recipe for stability, even if the machine is theoretically capable.
Using one machine instead of two is a false economy, particularly since, with EC2, machine pricing within each instance family is almost directly proportional to capacity.
Two t2.micro is exactly the same price of one t2.small, which has twice the CPU allowance and twice the memory... flip that around and you see that the micro is half of a small for half of the cost. Use two machines.