0

I don't know what's going wrong with my cloudformation templates it's throw some unknown error like.

2016-08-17 19:07:40,848 [ERROR] -----------------------BUILD FAILED!------------------------
2016-08-17 19:07:40,851 [ERROR] Unhandled exception during build: 'utf8' codec can't decode byte 0xfd in position 1245814: invalid start byte
Traceback (most recent call last):
  File "/opt/aws/bin/cfn-init", line 171, in <module>
    worklog.build(metadata, configSets)
  File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 118, in build
    Contractor(metadata).build(configSets, self)
  File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 505, in build
    self.run_config(config, worklog)
  File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 517, in run_config
    CloudFormationCarpenter(config, self._auth_config).build(worklog)
  File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 248, in build
    changes['commands'] = CommandTool().apply(self._config.commands)
  File "/usr/lib/python2.7/dist-packages/cfnbootstrap/command_tool.py", line 120, in apply
    log.debug(u"Command %s output: %s", name, commandResult.stdout.decode('utf-8'))
  File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfd in position 1245814: invalid start byte
Aamir_a
  • 1
  • 1
  • Don't know why it's create multiple cfn-init-cmd.log files like cfn-init-cmd.log.1 and cfn-init-cmd.log.2 – Aamir_a Aug 17 '16 at 19:58
  • I have bootstrap my instance with chef-solo, its getting error after it runs chef-solo. However, chef recipe runs fine and all config are in place, but cfn templates get failed signal – Aamir_a Aug 17 '16 at 20:00
  • "utf8' codec can't decode byte 0xfd in position 1245814". Looks like unicode issue. Check for the file encoding in your CFN, you can use any text editor. Convert it to "utf-8" and test again. – Mrigesh Priyadarshi Aug 18 '16 at 04:01
  • converted CFN but it didn't work – Aamir_a Aug 18 '16 at 13:49
  • Check some thing you are putting in your CFN which is not "UTF-8" encoded. And it has nothing to do with AWS. Check http://stackoverflow.com/questions/12468179/unicodedecodeerror-utf8-codec-cant-decode-byte-0x9c http://stackoverflow.com/questions/6180521/unicodedecodeerror-utf8-codec-cant-decode-bytes-in-position-3-6-invalid-dat – Mrigesh Priyadarshi Aug 19 '16 at 06:33

0 Answers0