In this step, App2Container generates artifacts needed to deploy your application container in AWS, based on application analysis and best practices.
You have two options for deployment to your target container management environment (Amazon ECR with Amazon ECS or Amazon EKS).
In this scenario, you will deploy your application container into Amazon Elastic Container Register (Amazon ECR) with Amazon ECS.
Run the following command to create the AWS CloudFormation template
app2container generate app-deployment --application-id <java-app-id>
The process will take few mins. You should see the below output.
root@ip-10-0-0-129:/home/ubuntu# app2container generate app-deployment --application-id java-tomcat-21fb1eb0 ✔ AWS prerequisite check succeeded ✔ Docker prerequisite check succeeded ✔ Created ECR Repository ✔ Registered ECS Task Definition with ECS ✔ Uploaded CloudFormation resources to S3 Bucket: app2container-bucket-0121 ✔ Generated CloudFormation Master template at: /root/app2container/java-tomcat-6c144e52/EcsDeployment/ecs-master.yml 👍 CloudFormation templates and additional deployment artifacts generated successfully for application java-tomcat-21fb1eb0 💡 You're all set to use AWS CloudFormation to manage your application stack.
With this command, App2container does the below steps:
You can update this tag and other container parameters in “analysis.json” file.
You do not need to make any changes in this file now, but be aware that you can customize it based on your requirements
Congratulations!, you are now all set and ready to deploy your Java Application to AWS ECS! Continue with the next section to trigger the deployment.