I get the following error when trying to create a stack using either of the provided templates in Cloudformation.
"Cannot parse template as YAML : special characters are not allowed"
I tried going through the template a bit but I wasn’t exactly sure what was causing this issue.
I’ve replicated this in the past when I copied and pasted from GitHub into the CloudFormation editor. Seems there are some hidden characters that the validator does not like. Try cloning the repo locally, then uploading the script into the CloudFormation console and see if that helps.
I cannot find an easy way to open up a new ticket related to this lab, so I’ll do it here.
The supplied YAML files do not provide the intended outcome.
The original stack is left untouched, and after running the ‘Disaster’ stack it creates everything from scratch, leaving the original website in a perfectly working condition.
The new stack of course outputs a new FQDN, in contrast to what is shown to be expected in the video.
At any rate I went ahead with ‘fixing’ the broken parts, but wasn’t able to load up the site, and it became clear that the reason is that the webserver was not running, because the user script failed with "Failed running /var/lib/cloud/instance/scripts/part-001" since "One of the configured repositories failed (Unknown),"
This lab is very poorly made (and maintained), I wasted an hour on it, and you should really improve it
You need to update the first stack with the second file, not create a second stack
Or just create another instance with the same user data and see that it works if the VPC config is OK. I actually think, it is a good exercise to see that the stuff is still broken because user data failed.
Just copy the contents from github and paste into a text file then change the extension. Any special characters you’ve copied won’t save to your notepad.
Select "raw" in the file page – will give you plain text.
this approached was fast and worked for me, thanks.
Also can’t figure out how to leave feedback on this lab so I’m going to leave some in this thread. The first CF stack creates successfully but website in not accessible. Tried hitting via the public IP and the FQDN. Tried in multiple regions and no dice. Something is off here. SG shows 80 accessible from 0.0.0.0. Not sure what’s happening here. Should it be broken before applying the CF Template that breaks it?
Thanks.. cloing the gitrepo worked for me..