Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeDeploy ymal file error

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?

like image 761
Sriwantha Attanayake Avatar asked Oct 15 '25 03:10

Sriwantha Attanayake


2 Answers

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...

like image 90
H6. Avatar answered Oct 18 '25 04:10

H6.


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

enter image description here

like image 37
Sriwantha Attanayake Avatar answered Oct 18 '25 03:10

Sriwantha Attanayake



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!