Source code containerization
AWS Transform supports replatforming applications to containers during migration to AWS. This chapter describes AWS Transform's agentic AI capabilities to automate the containerization of your source code. You can migrate and modernize in parallel, reducing the time and complexity of moving from on-premises to cloud-native architectures. You can containerize source code from GitHub, Bitbucket, GitLab, or .zip files, generate Docker images, publish to Amazon Elastic Container Registry (Amazon ECR), and deploy to Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS). This brings containerization into the same workflow you use to plan and execute rehost migrations.
Capabilities and key features
AWS Transform offers the following capabilities for containerizing your applications.
-
AI-driven source code analysis. Analyzes your application source code and automatically generates Docker artifacts, including Dockerfiles and related configuration files. No Docker expertise required.
-
Container image building and publishing. Builds and tests container images automatically, and publishes them to Amazon Elastic Container Registry with automated vulnerability scanning.
-
Infrastructure as Code generation. Generates production-ready deployment infrastructure for either Amazon Elastic Kubernetes Service (Helm charts) or Amazon Elastic Container Service (Terraform modules), with automated validation and security scanning. No need to write IaC from scratch.
-
Private dependency support. You can optionally configure AWS CodeArtifact repositories (Maven, PyPI, npm) and private Amazon ECR base images as dependency sources for your builds.
-
Iterative test and cutover deployment. Deploys test infrastructure for validation, then deploys finalized infrastructure for production cutover.
Note
Source code containerization is designed for applications that are not yet containerized. It requires access to your application source code and does not support migrating existing containerized workloads. To migrate existing containers to AWS, use standard deployment methods for Amazon Elastic Container Service or Amazon Elastic Kubernetes Service.
How containerization works
AWS Transform uses an AI-powered agent to guide you through the containerization process in a chat-based workflow. The agent handles the entire process from code analysis to deployed container, reducing days of manual Dockerfile authoring and infrastructure setup to hours. AWS Transform coordinates specialized tasks such as source code analysis, Docker image generation, and infrastructure creation. At key points in the workflow, you review and approve the output before proceeding.
You access source code containerization by creating a migration job. Within the job, you can run containerization as a standalone workflow, or as part of an end-to-end migration when a wave's migration strategy is set to containerize. For more information, see Migrations (including VMware).
Prerequisites
Before you begin, ensure that you have the following:
-
An AWS Transform workspace. For information about getting a workspace, see Getting started.
-
Your application source code in a Git repository accessible through AWS CodeConnections, or packaged as zip files for upload. Individual files must not exceed 1 GB, and the total size of all source code must not exceed 8 GB.
-
(Optional) An Amazon ECR repository for publishing container images. You can configure Amazon ECR access later in the workflow when you are ready to publish.
-
For Amazon EKS deployments: An existing Amazon EKS cluster, or permissions to create the required infrastructure.
-
For Amazon ECS deployments: Permissions to create Amazon ECS clusters, services, and related resources using Terraform, AWS CloudFormation, or AWS Cloud Development Kit (AWS CDK).
Containerization workflow
The containerization workflow consists of the following steps. The AWS Transform agent guides you through each step in the chat interface.
Note
In AWS GovCloud (US), you stop the workflow after the infrastructure as code step. For more information, see Differences in AWS GovCloud (US).
-
Step 1: Review security disclaimer. Review and accept the security disclaimer.
-
Step 2: Clone source code. Provide your application source code.
-
Step 3: Containerize. AI agent analyzes your code and generates Docker artifacts.
-
Step 4: Review Docker artifacts and code changes. Review generated artifacts and approve code changes.
-
Step 5: Publish images. Publish container images to Amazon ECR.
-
Step 6: Generate Infrastructure as Code. Generate Amazon EKS or Amazon ECS deployment templates.
-
Step 7: Deploy test infrastructure. Deploy and validate test infrastructure.
-
Step 8: Clean up test infrastructure. Tear down test resources.
-
Step 9: Deploy cutover infrastructure. Deploy production infrastructure.
Differences in AWS GovCloud (US)
Source code containerization is available in the AWS GovCloud (US) Regions. Some services that the containerization workflow uses in other AWS Regions aren't available in the AWS GovCloud (US) Regions. When you use AWS Transform in the AWS GovCloud (US) Regions, the following differences apply.
-
You must upload source code as ZIP files. AWS CodeConnections isn't available in AWS GovCloud (US), so you can't clone from GitHub, Bitbucket, or GitLab, and AWS Transform can't push changes to a new branch in your repository. Upload one ZIP file per application. Download the modified source code from the links that AWS Transform provides during Step 4: Review Docker artifacts and code changes. The connector configuration no longer asks for a CodeConnections ARN.
-
A private Amazon ECR base image is required. Amazon ECR Public isn't available in AWS GovCloud (US), so AWS Transform has no default base image and you can't use public registry images such as Amazon Linux from
public.ecr.awsor Docker Hub. During Step 2: Clone source code, you provide the Amazon ECR image URI of the base image to use. Before you start, push a base image to an Amazon ECR repository in the account and Region of your connector, and tag the repository so that AWS Transform can access it. AWS Transform can't complete the step until it verifies access to the image. -
AWS CodeArtifact isn't supported. AWS CodeArtifact isn't available in AWS GovCloud (US), so you can't configure Maven, PyPI, or npm repositories as private dependency sources. Private Amazon ECR base images are the only supported private dependency source.
-
Infrastructure deployment is manual. AWS Transform generates your Amazon EKS (Helm charts) or Amazon ECS (Terraform modules) infrastructure templates, but doesn't deploy them. The test deployment, test cleanup, and cutover deployment steps aren't part of the workflow. The workflow ends after infrastructure generation. Download the generated templates from the link that AWS Transform provides and deploy them yourself.
-
You can use containerization only in AWS GovCloud (US) workspaces. AWS GovCloud (US) Regions aren't available for workspaces in other AWS Regions. For the Regions that AWS Transform supports, see Supported Regions for AWS Transform.
Image building, vulnerability scanning, and publishing to Amazon ECR work the same way in AWS GovCloud (US) as in other AWS Regions.
Starting a containerization job
To containerize your applications, you first create a VMware migration job in your AWS Transform workspace. From within the job, you can choose to run a standalone containerization workflow or an end-to-end migration flow that includes containerization.
-
Standalone containerization — Containerize your source code without performing a full VMware migration. Choose this option when you want to containerize applications independently of any infrastructure migration.
-
End-to-end migration with containerization — Run the full VMware migration workflow with a containerize migration strategy assigned to one or more waves. The containerization workflow runs as part of the migration for those waves. For more information about VMware migration, see Migrations (including VMware).
To start a containerization job
-
On your workspace landing page, choose Create a job.
-
Choose VMware migration.
-
Choose whether to run a standalone containerization workflow or an end-to-end migration flow that includes containerization.
-
AWS Transform guides you through the workflow steps, starting with Step 1: Review security disclaimer.