I am trying to use AWS CodeDeploy to deploy a Java war file to an EC2 instance.
I already added a appspec.yml in the root of this war with this content:
version: 0.0
os: linux
files:
- source: /
destination: /var/scwcd/scwcd
I also created an EC2 instance and codeDeploy application can see this Ec2 instance. I manually upload this war file to my S3 bucket and set codeDeploy source to the S3 file. I also added enough permission for CodeDeploy to access S3 and EC2 instance.
But the deployment always failed with this message:
The overall deployment failed because too many individual instances failed deployment,
too few healthy instances are available for deployment,
or some instances in your deployment group are experiencing problems
I checked the deployment event list and found every actions are skipped without error code:
I also checked the EC2 instance and found the destination folder /var/scwcd is not there.
Does anybody know what I missed?
Thanks!