0
votes

I am getting following error while re-deploying the site using code-deploy and code pipeline

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.

The first deployment works without any issue, however if make a small change within index.html file and click on release change, my source stage gets succeeded but it fails on deploy stage, and if i put the original file back in S3 i get the above error. Version is enabled on S3, code agent is also running on windows machine

Finally got the exact error message from the code deploy log. Can anyone help as to why i dont see this error with original deployment and what changes when i only make small change in index.html and dont change anything else and save it with the same name, it fails

2019-03-29T16:01:55 ERROR [codedeploy-agent(3728)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Error during perform: RuntimeError - The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml". The revision was unpacked to directory "C:\ProgramData/Amazon/CodeDeploy/7f6993e8-a33a-41c4-a7c5-861f5c8b61d9/d-SI7UK8P1Z/deployment-archive", and the AppSpec file was expected but not found at path "C:\ProgramData/Amazon/CodeDeploy/7f6993e8-a33a-41c4-a7c5-861f5c8b61d9/d-SI7UK8P1Z/deployment-archive/appspec.yml". Consult the AWS CodeDeploy Appspec documentation for more information at http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html - C:/Windows/TEMP/ocr5060.tmp/src/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:223:in `parse_app_spec'

my appspec.yml file is in the root directory, nothing is changed from original file

1
There may be multiple reasons. To determine the point at which it fails, check the CodeDeploy logs and follow the links in this doc on the HEALTH_CONSTRAINTS error code row.vahdet
Thank you for getting back to me. I did go through all the documentation. The only concern is why is the application starts working again when i put the original package back in S3, When i make a small change in index.html and upload with the same name, it picks the new version but fails on deploy, so definately not a server health issuesanees
This is the link i am following for original deployment docs.aws.amazon.com/codepipeline/latest/userguide/… which works perfectly fine, i am guessing something to do with package, but not changing anything else apart from 1 word in index.htmlsanees

1 Answers

0
votes

This issue is resolved, when i was zipping the folder, i had another folder within which i had appspec.yml which was causing the issue e.g test/appspec.yml when i place appspec.yml in root dir this fixed the issue