I have a java web application, which has two layers( business layer and presentation layer both layers has their own war files). I want to deploy this into AWS using AWS CodeDeploy.and I am using RDS MySQL as database. can anyone tell me how can I deploy this application using CodeDeploy? Do I need to have two different appspec.yml file for the deployment?
Thanks in Advance.
This really depends on how you want to deploy your code. You need exactly one appspec per bundle you want to deploy.
If you want to deploy your businesses layer and your presentation layer separately, you will need two different deployments, two separate (logical) applications in CodeDeploy, two bundles, each with their own appspec. Each appspec would be responsible for stopping, configuring, and starting only one of the layers.
If you want to deploy both layers as part of the same deployment then you will have one deployment, one (logical) application in CodeDeploy, one bundle, which would have only one appspec. That appspec would be responsible for managing the lifecycle of both of you layers.