Elastic Beanstalk Configuration - RyanShahidi/Django-Nuxt-Docker-AWS-Cookiecutter GitHub Wiki
Setting up Elastic Beanstalk
Creating new environment
- Click Create a new environment
- Select environment tier
- Choose web server environment
- Create environment
- Application name
- Name whatever you would like, for the example app Jarvis, I would choose jarvis-production
- Environment information
- Leave default
- Platform
- Platform - Docker
- Platform branch - Multi-container Docker running on 64 bit Amazon Linux
- Platform version- leave at default
- Application code
- Sample application - Leave at sample application
- Now click configure more options
- This will open up a configuration page to configure to our specifications
- Application name
- Select environment tier
Configuring Elastic Beanstalk environment after creation
-
Software
- Under Instance log streaming to CloudWatch Logs click Enabled
- Under Environment properties add your environmental variables. You do not need to add RDS variables at this time.
- Finally, click Apply
-
Load Balancing
- Click Capacity
- Under Environment type select Load balanced
- Min - 1
- Max - 4
- Leave rest as default and click Save
- Now you should be able to edit the Load balance tab.
- Make sure Application Load Balancer is selected
- Under Listeners click Add listener
- Listener port - 443
- Listener protocol - HTTPS
- SSL certificate - SSL Certificate that you created previously
- SSL policy - ELBSecurityPolicy-TLS-1-2-2017-01
- Leave default process as default
- Click Add
- Click Save
-
Network
- There will be an “error” saying that this environment is not part of a VPC. Click Edit
- Select the VPC configuration (todo - document this step)
- Load balancer settings
- Just select the first two availability zones for now, can expand in the future
- Ex: us-east-1a and us-east-1b
- Select same zones for Instance settings
- Just select the first two availability zones for now, can expand in the future
- There will be an “error” saying that this environment is not part of a VPC. Click Edit
-
Database
- Engine - postgres
- Engine version - 12.2
- Instance class - Leave as micro
- Storage - Leave as 5
- Username - Whatever you want (ex: jarvisuser)
- Password - Whatever you want