简体   繁体   中英

AWS Elastic Beanstalk Django configuration file exception

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.

Why not try the exact format as shown in tutorial.

option_settings:
   aws:elasticbeanstalk:container:python:
      WSGIPath: project.wsgi:application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM