Depending on the application itself, it might be difficult to impossible to containerize such a Windows application (e.g. if it requires user interaction via Windows UI). You should first analyze and assess that application to understand whether it can be containerized.
If so, you have several options then.
Amazon EKS supports running Windows containers, see this blog post for details. Note that running applications in a Kubernetes cluster requires a deep understanding of how Kubernetes works.
If there is no requirement to use Kubernetes, you can consider Amazon ECS with Fargate for running your Windows containers. You can read this blog post that explains how to do this. By using Amazon ECS with Fargate, you can take advantage of the serverless, pay-as-you-go compute engine for running Windows applications.
If the application in question cannot be containerized, you can run it directly on Windows EC2 instances.
Considering the additional information you provided in the comment of this answer:
- Containerizing a "headless" Windows app should be possible without large code changes. You will still need an executable that loads the app's DLL and runs the code functions.
- Migrating a native C application code to a managed environment (e.g. .NET or Java) might be challenging; there are some incompatible features in the programming languages and runtimes such as memory management, pointers, object-oriented paradigm, and so on - thus, the code might need to change a lot. Also, a managed environment might execute some functions slower than a native one, so if performance is a strict requirement, this has to be measured.
- With your current setup (a .NET webapp that calls a native C library), you should be able to integrate that library in the webapp as a dependency and containerize it. Then, use the container options mentioned above (Amazon ECS or Amazon EKS).
- You can also separate the .NET webapp from the calculation engine and introduce another .NET webapp which will serve as a wrapper for the native library. Consider this approach if you want to offer that calculation engine as a microservice.
- AWS offers a tool (Porting Assistant for .NET) for migrating from old .NET Framework to the new .NET platform, but not from native to managed.
- AWS App2Container can help you containerize your existing .NET application.
- Accepted AnswerMODERATORasked 3 years ago
- asked a year ago
- Accepted Answerasked a year ago
- Accepted Answerasked a year ago
- How do I configure volume mapping or find the volume mapping for my EC2 Windows Server 2016 or later instance?AWS OFFICIALUpdated 8 months ago
- How can I generate server and client certificates and their respective keys on a Windows server and upload them to ACM?AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- EXPERTpublished 8 months ago
- EXPERTpublished a month ago
Thanks @Dmitry for your response.
This application contains logic of a calculation engine and also it doesn't have any UI. This application is yet again invoked by another neighboring application hosted in the same server. That caller application is a web application written in C#. It invokes DLL of this C application and get the calcs response.
So it has only functions written inside for various calculations. Can we migrate this application into .NET core ? Do we have any supported tools in AWS for migrating to a new technology ?
Thank you for providing more details! I updated my answer.
I would add that, since the calculation engine library is written in C, that it may be worth assessing whether (and how many) Windows APIs (or MFC, Win32 API, etc) that the code uses. If it's none, or minimal, you may consider compiling the C library for Linux (using gcc or another compiler). If you then port your existing ASP.NET application to ASP.NET Core (and as Dmitry said, we have a tool to help with that), you could then move the entire application to Linux container(s), which would cost less, and launch/scale faster.
Thank you for sharing such a valuable information