简体   繁体   中英

Elastic Beanstalk - '.ebextensions/02_setup.config' - Contains invalid key: '03_wsgipass'

Using this guide to try to deploy my django app which uses channels: https://medium.com/@elspanishgeek/how-to-deploy-django-channels-2-x-on-aws-elastic-beanstalk-8621771d4ff0

This is my 02_setup.config

container_commands:
  00_pip_upgrade:
    command: "source /opt/python/run/venv/bin/activate && pip install --upgrade pip"
    ignoreErrors: false
  01_migrate:
    command: "django-admin.py migrate"
    leader_only: true
  02_collectstatic:
    command: "django-admin.py collectstatic --noinput"
03_wsgipass:
    command: 'echo "WSGIPassAuthorization On" >> ../wsgi.conf'

When running eb create django-env I get:

Printing Status:
2020-06-17 16:11:36    INFO    createEnvironment is starting.
2020-06-17 16:11:38    INFO    Using elasticbeanstalk-us-west-2-041741961231 as Amazon S3 storage bucket for environment data.
2020-06-17 16:11:39    WARN    Error processing file (Skipping): '.ebextensions/02_setup.config' - Contains invalid key: '03_wsgipass'. For information about valid keys, see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
2020-06-17 16:12:00    INFO    Created security group named: sg-09fcbd00450e2438d
2020-06-17 16:12:15    INFO    Created load balancer named: awseb-e-3-AWSEBLoa-1E8WRE8X90Q7D
2020-06-17 16:12:15    INFO    Created security group named: awseb-e-3um2qhsms9-stack-AWSEBSecurityGroup-1OH8TOJHUVWOT
2020-06-17 16:12:15    INFO    Created Auto Scaling launch configuration named: awseb-e-3um2qhsms9-stack-AWSEBAutoScalingLaunchConfiguration-7V5MPL4ZNZOG
2020-06-17 16:13:35    INFO    Created Auto Scaling group named: awseb-e-3um2qhsms9-stack-AWSEBAutoScalingGroup-6WNX8OQK3WQO
2020-06-17 16:13:35    INFO    Waiting for EC2 instances to launch. This may take a few minutes.
2020-06-17 16:13:50    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:us-west-2:041741961231:scalingPolicy:b25f0129-aec8-414c-9b64-72b95986648c:autoScalingGroupName/awseb-e-3um2qhsms9-stack-AWSEBAutoScalingGroup-6WNX8OQK3WQO:policyName/awseb-e-3um2qhsms9-stack-AWSEBAutoScalingScaleUpPolicy-N1XL34JAPA6S
2020-06-17 16:13:50    INFO    Created Auto Scaling group policy named: arn:aws:autoscaling:us-west-2:041741961231:scalingPolicy:f6eecd79-39ee-475d-b927-ed1a5dc205d5:autoScalingGroupName/awseb-e-3um2qhsms9-stack-AWSEBAutoScalingGroup-6WNX8OQK3WQO:policyName/awseb-e-3um2qhsms9-stack-AWSEBAutoScalingScaleDownPolicy-155DVPR0DTOK
2020-06-17 16:13:50    INFO    Created CloudWatch alarm named: awseb-e-3um2qhsms9-stack-AWSEBCloudwatchAlarmHigh-CPMPHOMFE9IT
2020-06-17 16:13:50    INFO    Created CloudWatch alarm named: awseb-e-3um2qhsms9-stack-AWSEBCloudwatchAlarmLow-UVP8LL57BLI4
2020-06-17 16:17:49    INFO    Successfully launched environment: django-env

What's wrong with the 03_wsgipass command?

The indentation of 03_wsgipass is incorrect. Thus EB wants to use it as a new section in your config file, rather then a part of container_commands .

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