FYI: La instancia t2.micro de AWS es demasiado pequeña. Usa al menos t2.small

Also, how big was the swapfile you created?