Overview
Configuring AWS EC2 auto scaling group for PostgreSQL
This section reviews how to configure an AWS EC2 instance for a PostgreSQL server. We will
Create a security group that allows SSH and PostgreSQL server connections
Create a launch template
Create server using auto scaling group (recommended) OR single instance
Attach an elastic IP address to our instance
Each of these subsections contains a video that walks through the instructions.
Why use AWS EC2 Auto Scaling over a single instance?
Auto-scaling adds or removes EC2 instances depending on changes in demand on the server. By using an auto scaling group, we can keep costs down by utilizing a smaller-sized instance (i.e 2 vCPUs) and adding instances when CPU usage increases.
AWS EC2 auto scaling allows you to
Assign a launch template to your auto scale group
A launch template is a saved pre-configuration of an instance that you can use to launch instances that have the same parameters
AWS uses your launch template to add instances you've previously configured when scaling out your application
Note: scaling out is when AWS adds instances when demand increases
Configure the minimum, maximum, and desired number of instances for your application
Prevent certain instances from being automatically terminated when scaling in
Note: scaling in is when AWS removes instances when demand decreases
Set a scaling policy that defines when instances should be added or removed from the group
References
Guides
Documentations
Forums
Last updated
Was this helpful?