AWS App2Container
A command-line tool that analyzes on-premises Java/.NET applications and automatically generates container images and deployment artifacts for ECS/EKS
Overview
AWS App2Container (A2C) is a command-line tool that analyzes Java and .NET applications running on-premises or on EC2, automating the generation of Docker container images, creation of ECS task definitions and EKS manifests, and construction of CI/CD pipelines. It automatically detects application dependencies, network connections, and file system usage, completing containerization with minimal manual effort.
Application Analysis and Containerization Process
The App2Container workflow consists of four steps: inventory (discovery), analyze (analysis), containerize (containerization), and generate (deployment artifact generation). The inventory command automatically discovers Java (Tomcat, JBoss, Spring Boot) and .NET (IIS) applications running on the server and displays a list. The analyze command performs detailed analysis of the selected application's dependencies (libraries, configuration files, environment variables, network ports) and outputs the information needed for containerization as a JSON report. The containerize command auto-generates a Dockerfile based on the analysis results and builds a Docker image. The generated Dockerfile uses a best-practice multi-stage build configuration, producing minimal images without unnecessary files.
Automatic Generation of ECS/EKS Deployment Artifacts
The generate command automatically produces all artifacts needed to deploy containerized applications to ECS or EKS. For ECS, it generates task definitions, service definitions, ALB configurations, security groups, and CloudFormation templates. For EKS, it generates Kubernetes manifests for Deployments, Services, and Ingresses along with Helm charts. ECR repository creation and image pushing are also performed automatically. Additionally, it can auto-build a CI/CD environment including CodeCommit repositories, CodeBuild projects, and CodePipeline pipelines, enabling immediate continuous delivery after containerization. All generated artifacts are customizable, allowing adjustments to resource sizes, replica counts, and health check settings to match requirements.
Migration Strategy and Staged Refactoring Approach
While App2Container automates lift-and-shift containerization, using it as a starting point for staged refactoring is an effective strategy. In the first stage, A2C containerizes the monolithic application as-is and runs it on ECS/EKS. At this point, benefits of container orchestration, auto-scaling, and rolling deployments are immediately available. In the second stage, highly independent modules within the monolith are separated into individual container services, progressing toward microservices. The network connection information included in App2Container's analysis report serves as critical input data for understanding inter-module dependencies and determining service boundary splits. Windows container support enables migrating .NET Framework applications to ECS as Windows containers, with a realistic roadmap for future migration to .NET Core.