Home:ALL Converter>AWS Elastic Beanstalk Django configuration file exception

AWS Elastic Beanstalk Django configuration file exception

Ask Time:2019-07-24T09:25:20         Author:2pac

Json Formatter

I'm trying to deploy a sample Django (Python 3.6) application to AWS Elastic Beanstalk via the eb CLI tool. I followed this tutorial and all is going good until I get to the YAML Django configuration file.

I'm using Sublime 3 for editing, at first I thought it had some problem with the encoding and/or tabs but then I tried with vim, copy-pasting the exact code from the tutorial and got the same error every time.

My project structure is

/
/project
/project/wsgi.py
...
$ cat .ebextensions/django.config
option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: project/wsgi.py

When I run eb deploy I get the next error:

ERROR: InvalidParameterValueError - The configuration file .ebextensions/django.config in application version 2.0.0 contains invalid YAML or JSON. YAML exception: Invalid Yaml: while scanning for the next token
found character     '\t' that cannot start any token
 in "<reader>", line 2, column 1:
        aws:elasticbeanstalk:container: ... 
    ^
, JSON exception: Invalid JSON: Unexpected character (o) at position 0.. Update the configuration file.

Author:2pac,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/57174046/aws-elastic-beanstalk-django-configuration-file-exception
yy