ec2 is just vps. you can put whatever you want on it. my startup uses eks (aws) with some extra tuning. for one, you need to allocate one container per vps as the beam likes to grab all the cores. there's also the additional network configs to make sure the nodes can discover each other. swarm has tooling for this. I won't say its easy but its doable and pretty resilient once you have it up an running.