我正在尝试在AWS elasticbeanstalk上传我的Django休息框架应用程序。我按照这里的步骤http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
我完全按照那里提到的那样做了,最后在创建环境时出错了。
WARNING: You have uncommitted changes.
Creating application version archive "app-989c-171129_120334".
Uploading TestApi/app-989c-171129_120334.zip to S3. This may take a while.
Upload Complete.
ERROR: InvalidParameterValueError - The configuration file .ebextensions/packag
s.config in application version app-989c-171129_120334 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 6, column 1:
^
, JSON exception: Invalid JSON: Unexpected character (p) at position 0.. Update
the configuration file.
我的文件包含与文档中提到的完全相同的信息。 .ebextensions \ django.config: -
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: ebdjango/wsgi.py
我哪里错了?
更新: -
(env) C:\Users\india\Desktop\tutorial\env>eb init -p python2.7 TestApi
Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
13) us-east-2 : US East (Ohio)
14) ca-central-1 : Canada (Central)
15) eu-west-2 : EU (London)
(default is 3):
Application TestApi has been created.
(env) C:\Users\india\Desktop\tutorial\env>eb init
Note: Elastic Beanstalk now supports AWS CodeCommit; a fully-managed source cont
rol service. To learn more, see Docs: https://aws.amazon.com/codecommit/
Do you wish to continue with CodeCommit? (y/N) (default is n): y
Select a repository
1) codecommit-origin
2) [ Create new Repository ]
(default is 1):
(env) C:\Users\india\Desktop\tutorial\env>eb create djang0-api-env
WARNING: You have uncommitted changes.
Creating application version archive "app-989c-171129_111635".
Uploading TestApi/app-989c-171129_111635.zip to S3. This may take a while.
Upload Complete.
Environment details for: djang0-api-env
Application name: TestApi
Region: us-west-2
Deployed Version: app-989c-171129_111635
Environment ID: e-89wz2qwskj
Platform: arn:aws:elasticbeanstalk:us-west-2::platform/Python 2.7 running on 6
4bit Amazon Linux/2.6.0
Tier: WebServer-Standard
CNAME: UNKNOWN
Updated: 2017-11-29 05:46:52.690000+00:00
Printing Status:
INFO: createEnvironment is starting.
INFO: Using elasticbeanstalk-us-west-2-957209152698 as Amazon S3 storage bucket
for environment data.
ERROR: The configuration file .ebextensions/packages.config in application versi
on app-989c-171129_111635 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 6, column 1:
^
, JSON exception: Invalid JSON: Unexpected character (p) at position 0.. Update
the configuration file.
ERROR: Failed to launch environment.
ERROR: ServiceError - Failed to launch environment.