I want to create a VM on EC2(Microsoft Windows Server 2019 Base - ami-0eaa025a752a23c5b) that can run windows container and linux container at the same time. I know WSL 2 can support docker container and run on windows 10 Build 18917. I am not sure if it is available to run on Windows Server 2019. If so, what build of the windows server 2019 should I use. Any help would be appreciated.
There are 2 issues with WSL 2 on Windows Server 2019 on EC2:
1) WSL 2 is available only in Insider builds at the moment. It is unlikely that it would be added into Windows Server 2019 at all, and there is no insider version for next LTSC Server. You can use use insider builds of semi-annual server for WSL 2, but it would be non trivial to install it on EC2
2) WSL 2 requires Hyper-V and Hyper-V supported only on Bare Metal Instances of EC2.
So it is much easier to run linux and windows docker containers separately in aws.