AWS CodeDeploy ymal file error

时光毁灭记忆、已成空白 提交于 2020-06-28 06:00:25

问题


I am deploying an application using AWS code deploy to Windows environment. I use an apspec.yml yaml file. When I deploy the application I get following error

The deployment failed because an invalid version value () was entered in the application specification file. Make sure your AppSpec file specifies "0.0" as the version, and then try again.

It seems like there is a problem with encoding or line ending. All the materials in the internet are for linux but not for windows. I use visual studio editor to edit this file. How to fix this issue?


回答1:


The issue is in the line ending. If you create a yml file make sure you use \n line ending (linux way of line ending) instead of \r\n (windows way of line ending). If your editor is visual studio when you safe the yml file save it as follows. File->Advanced Saved Options




回答2:


In my case the encoding was wrong. appspec.yml should be saved as UTF-8 and not UTF-8 BOM.

BTW: The encoding can be changed in VS 2017 using File > Save as.., then the down arrow at the Save-Button ... Save with encoding...




回答3:


Make sure your appspec.yml starts with below line

version: 0.0

codedeploy requires this attribute as must. refer this



来源:https://stackoverflow.com/questions/43485953/aws-codedeploy-ymal-file-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!