FYI : L'instance AWS t2.micro est trop petite. Utilisez au moins une t2.small.

Also, how big was the swapfile you created?