I am launching elastic beanstalk with a shared load balancer and I want to define RDS. This environment does not start up. it errors on migrate command. however if I run this using classic LB it works fine.
here is my saved config which I am trying to use
Platform:
PlatformArn: arn:aws:elasticbeanstalk:eu-west-2::platform/Python 3.6 running on 64bit Amazon Linux/2.9.17
OptionSettings:
aws:elasticbeanstalk:command:
BatchSize: '30'
BatchSizeType: Percentage
AWSEBAutoScalingScaleUpPolicy.aws:autoscaling:trigger:
UpperBreachScaleIncrement: '3'
aws:elasticbeanstalk:application:environment:
AWS_ACCESS_KEY_ID: '{{resolve:ssm:domain-api-qa-AWS_ACCESS_KEY_ID:1}}'
AWS_SECRET_ACCESS_KEY: '{{resolve:ssm:domain-api-qa-AWS_SECRET_ACCESS_KEY:1}}'
HASHID_SALT: '{{resolve:ssm:domain-api-qa-HASHID_SALT:1}}'
SECRET_KEY: '{{resolve:ssm:domain-api-qa-SECRET_KEY:1}}'
VAPID_PRIVATE_KEY: '{{resolve:ssm:domain-api-qa-VAPID_PRIVATE_KEY:1}}'
VAPID_PUBLIC_KEY: '{{resolve:ssm:domain-api-qa-VAPID_PUBLIC_KEY:1}}'
ENVIRONMENT: qa
EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend
CORS_ORIGIN_ALLOW_ALL: '1'
AWS_S3_REGION_NAME: eu-west-2
ALLOWED_HOSTS: '*'
AWS_STORAGE_BUCKET_NAME: domain-qa-v3
ALLOWED_CIDR_NETS: 172.31.0.0/16
DEBUG: 0
AWSEBCloudwatchAlarmLow.aws:autoscaling:trigger:
BreachDuration: '1'
LowerThreshold: '10'
MeasureName: CPUUtilization
Period: '1'
Unit: Percent
aws:ec2:vpc:
VPCId: vpc-998811f1
Subnets: subnet-9924d6d5
ELBSubnets: subnet-bdf758c7,subnet-0c82813886be87156
ELBScheme: public
AssociatePublicIpAddress: true
DBSubnets: subnet-d8197ab1
aws:elbv2:loadbalancer:
ManagedSecurityGroup: sg-0f4dfa8e4cab511df
SecurityGroups: sg-0f4dfa8e4cab511df
SharedLoadBalancer: arn:aws:elasticloadbalancing:eu-west-2:799479065523:loadbalancer/app/uat-lb-to-proxy/86d8bed7ddc5b710
aws:elbv2:listener:443:
ListenerEnabled: true
SSLPolicy: ELBSecurityPolicy-TLS-1-2-2017-01
SSLCertificateArns: arn:aws:acm:eu-west-2:799479065523:certificate/5fb4f19c-f377-4ef6-8a7a-9657832c0d17
Protocol: HTTPS
Rules: domainapiqav3
aws:elbv2:listener:80:
ListenerEnabled: true
Protocol: HTTP
Rules: domainapiqav3,default
aws:elasticbeanstalk:environment:process:default:
StickinessLBCookieDuration: 86400
DeregistrationDelay: 20
StickinessType: lb_cookie
HealthCheckInterval: 15
MatcherHTTPCode: 200,301
HealthyThresholdCount: 3
HealthCheckPath: /admin
Port: 80
StickinessEnabled: false
Protocol: HTTP
UnhealthyThresholdCount: 5
HealthCheckTimeout: 5
aws:autoscaling:asg:
MinSize: '1'
aws:elasticbeanstalk:container:python:
StaticFiles: /static/=www/static/
WSGIPath: domain/wsgi.py
aws:autoscaling:updatepolicy:rollingupdate:
RollingUpdateType: Health
RollingUpdateEnabled: true
AWSEBCloudwatchAlarmHigh.aws:autoscaling:trigger:
UpperThreshold: '40'
aws:elbv2:listenerrule:domainapiqav3:
process: default
Priority: 2
PathPatterns: /*
HostHeaders: qa-v3.hcidomain.digital
aws:elb:policies:
ConnectionDrainingEnabled: true
aws:ec2:instances:
InstanceTypes: t2.nano
aws:rds:dbinstance:
DBPassword: '{{resolve:ssm:domain-api-qa-DATABASE_PASSWORD:1}}'
DBInstanceClass: db.t2.micro
DBEngine: postgres
DBUser: domainapiqav3
DBDeletionPolicy: Snapshot
AWSEBAutoScalingGroup.aws:autoscaling:asg:
Cooldown: '120'
MaxSize: '1'
aws:elasticbeanstalk:environment:
ServiceRole: arn:aws:iam::799479065523:role/aws-elasticbeanstalk-service-role
LoadBalancerIsShared: true
LoadBalancerType: application
aws:autoscaling:launchconfiguration:
MonitoringInterval: 1 minute
SecurityGroups: sg-02f4b9d375726a228,sg-0f4dfa8e4cab511df,sg-04528eebcfab2488f,sg-0c35250ad9b1aa633
IamInstanceProfile: aws-elasticbeanstalk-ec2-role
EC2KeyName: domain
EnvironmentTier:
Type: Standard
Name: WebServer
AWSConfigurationTemplateVersion: 1.1.0.0
Tags:
project: domain
I use the following command to create the environment
eb create domain-api-qa-v3 --cfg domain-api-qa-v3
--cname qa-v3
--vpc
--vpc.ec2subnets subnet-9924d6d5
--vpc.elbsubnets subnet-bdf758c7,subnet-0c82813886be87156
--vpc.dbsubnets subnet-d8197ab1
--vpc.id vpc-998811f1
--vpc.securitygroups sg-02f4b9d375726a228,sg-0f4dfa8e4cab511df,sg-04528eebcfab2488f,sg-0c35250ad9b1aa633
--tags project=domain,Name=domain-api-qa-v3
--service-role aws-elasticbeanstalk-service-role
--region eu-west-2
--platform "arn:aws:elasticbeanstalk:eu-west-2::platform/Python 3.6 running on 64bit Amazon Linux/2.9.17"
--keyname domain
Error I get is raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version) django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).
When I look at beanstalk configuration I can see the database section is empty, even though I have defined it in the saved config.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…