amazon-elastic-beanstalk
How to run a celery worker with Django app scalable by AWS Elastic Beanstalk?
This is how I set up celery with django on elastic beanstalk with scalability working fine. Please keep in mind that ‘leader_only’ option for container_commands works only on environment rebuild or deployment of the App. If service works long enough, leader node may be removed by Elastic Beanstalk. To deal with that, you may have … Read more
AWS Elastic Beanstalk environment variables in ASP.NET Core 1.0
I just implemented a slightly other solution which injects the beanstalk environment variables to the program so that you may access them by Environment.GetEnvironmentVariable(): private static void SetEbConfig() { var tempConfigBuilder = new ConfigurationBuilder(); tempConfigBuilder.AddJsonFile( @”C:\Program Files\Amazon\ElasticBeanstalk\config\containerconfiguration”, optional: true, reloadOnChange: true ); var configuration = tempConfigBuilder.Build(); var ebEnv = configuration.GetSection(“iis:env”) .GetChildren() .Select(pair => pair.Value.Split(new[] { … Read more
How to get Elastic Beanstalk nginx-backed proxy server to auto-redirect from HTTP to HTTPS?
After several false-starts with ideas from Amazon’s paid support, they did come through in the end. The way you get this to work is you configure your environment to respond to both port 80 and 443. Then create a folder in your main Node.js app folder called .ebextensions, and you place a file named 00_nginx_https_rw.config … Read more
How to link godaddy domain with AWS Elastic Beanstalk environment?
No need to create a CNAME or do any forwarding – this is bad from the point of SEO and not recommended by Amazon. Even you should not point a record to IP directly – it will cause a lot of troubles in the future because IP can be changed any moment. The most elegant … Read more
Nginx config file overwritten during Elastic Beanstalk deployment?
After spending almost entire day and trying out all the possible solutions, as of July 17, 2017, the above solution does not work. For me, I wanted to replace /etc/nginx/conf.d/elasticbeanstalk/00_application.conf I created the below shown folder structure in my .ebextension folder and the file was overwritten with my content. This solution also worked for nginx.conf … Read more
How do you run a worker with AWS Elastic Beanstalk?
As @chris-wheadon suggested in his comment, you should try to run celery as a deamon in the background. AWS Elastic Beanstalk uses supervisord already to run some deamon processes. So you can leverage that to run celeryd and avoid creating a custom AMI for this. It works nicely for me. What I do is to … Read more