AWS App2Container (A2C)
Overview
AWS App2Container (A2C) is a command-line tool that helps enterprises modernize legacy applications by containerizing existing applications running on virtual machines (VMs...whether it's on-premises or an EC2 VM.) or bare metal servers without requiring code changes.
Key Features
Feature |
Description |
Automated Containerization. |
Automatically identifies
application artifacts and dependencies. |
Supports Multiple Platforms. |
Works with Java and .NET
(Windows/Linux) applications. |
Generates Docker Artifacts. |
Produces Dockerfiles and container
images. |
Infrastructure-as-Code Output. |
Generates ECS, EKS, and App Runner
deployment artifacts. |
Integration with AWS Services. |
Integrated with AWS CodeBuild,
ECS, EKS, and App Runner. |
Supported Application
Types
- Java Applications:
- Standalone JARs
- Spring Boot
- Tomcat-based applications
- .NET Applications:
- .NET Framework (Windows only)
- .NET Core (Windows/Linux)
How AWS App2Container
Works
- Install A2C CLI
on the VM or server hosting the application.
- Inventory and Analyze
the application.
- Containerize:
- A2C creates a Dockerfile, container image, and
ECS/EKS/App Runner artifacts.
- Deploy:
- Deploy the container image to ECS, EKS, or App Runner using generated IaC templates.
Output Artifacts
- Dockerfile
- ECS Task Definition / EKS Kubernetes YAML / App Runner
config
- CloudFormation templates
- Container image (built locally or with CodeBuild)
Deployment Targets
Service |
Use Case |
Amazon ECS. |
Simple container orchestration |
Amazon EKS. |
Kubernetes-based orchestration |
App Runner. |
Serverless container deployments |
Benefits
- Speeds up container adoption.
- Reduces migration effort.
- Maintains application behavior.
- Simplifies deployment on AWS container services.
Example Use Case
A company with a legacy Java app
running on EC2:
- Installs A2C on the EC2 instance.
- Runs A2C to detect and containerize the app.
- Deploys it to ECS using generated CloudFormation
templates.
Here is a step-by-step guide with commands to
help use AWS App2Container (A2C) to
containerize an existing application.
Step-by-Step Guide to Use AWS App2Container
Prerequisites:
·
EC2 instance or on-premise VM where twtech app is running.
·
AWS CLI configured (aws
configure)
·
Admin privileges on the host
·
Docker installed
·
App2Container installed
Step 1: Install App2Container
Download and install A2C on the
application server:
Linux:
# bash
curl -O
https://d1.awsstatic.com/managed-files/AWS-App2Container-Installer.zip
unzip
AWS-App2Container-Installer.zip
sudo
./install.sh
Windows (PowerShell):
# powershell
Invoke-WebRequest
-Uri https://d1.awsstatic.com/managed-files/AWS-App2Container-Installer.zip
-OutFile A2C.zip
Expand-Archive
-Path A2C.zip -DestinationPath .
.\install.ps1
Step 2: Initialize A2C
Initialize A2C to set up the
workspace:
# bash
app2container
init
twtech will be prompted to
configure:
- Application artifact storage (e.g., S3 bucket)
- AWS Region
- Container registry (ECR)
- IAM roles or profiles
Step 3: Inventory the Running Applications
Scan for running apps on the
instance:
# bash
app2container
inventory
This returns a list of detected
applications with an application-id.
Step 4: Analyze the Application
Choose an application ID from the
inventory and analyze it:
# bash
app2container
analyze --application-id app-id
This gathers dependencies, open
ports, and startup processes.
Step 5: Containerize the Application
Generate Dockerfile, ECS/EKS/App
Runner artifacts, and optionally build image:
# bash
app2container
containerize --application-id
app-id
twtech will get:
- Dockerfile
- Deployment YAML/JSON
- Image (if built locally)
Step 6: Deploy the Container (Optional)
twtech can deploy using one of the
provided CloudFormation templates.
To ECS:
# bash
app2container
generate app-deployment --application-id app-id --deploy ECS
To EKS:
# bash
app2container
generate app-deployment --application-id app-id --deploy EKS
To App Runner (only for
web apps):
# bash
app2container
generate app-deployment --application-id app-id --deploy apprunner
Then use the generated
CloudFormation template to deploy:
# bash
aws
cloudformation deploy --template-file twtech-a2c-template.yaml --stack-name
twtech-app-stack
After Deployment
- twtech application is now running in a container.
- Logs, health checks, and scaling are managed by the target AWS service.
No comments:
Post a Comment