This configuration will run celery-worker and celery-beat on a single (leader) node, using supervisor.
Also it'll run './manage.py migrate' on a single node after each deployment
Ensure that requirements.txt includes:
pycurl==7.43.0 --global-option="--with-nss"
You may also need to do:
eb setenv PYCURL_SSL_LIBRARY=nss
Note that you should not include AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in your settings. Boto will pick them up from the instance profile automatically.
Ensure your instance profile (aws-elasticbeanstalk-ec2-role) has permission to talk to SQS, and possibly SES if you use django-ses.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:*"
],
"Resource": "arn:aws:sqs:*:*:*"
},
{
"Effect": "Allow",
"Action": [
"ses:SendRawEmail",
"ses:SendEmail",
"ses:GetSendQuota"
],
"Resource": "*"
}
]
}
Much of this was sourced from: