Create a PostgreSQL Server Using AWS EC2
  • Introduction
  • AWS EC2: Launching Instance
    • Overview
    • Create Security Group
    • Create Launch Template
    • Option 1: Create Auto Scaling Group
    • Option 2: Create a Single Instance
    • Attach Elastic IP Address
  • Ubuntu 20.04: Configuring PostgreSQL
    • Overview
    • Install PostgreSQL
    • Add Role to PostgreSQL Server
    • Allow Remote Connection
  • Remote Server: Accessing Server on Local Computer
    • Overview
    • Connect with pgAdmin4
    • Connect with Python API
  • AWS EC2: Backup Server
    • Overview
    • Configuring Automatic Backups
  • Next Steps
Powered by GitBook
On this page

Was this helpful?

  1. AWS EC2: Launching Instance

Create Security Group

Configure security group for launch template

You need to allow the following network traffic to your PostgreSQL instance.

  • SSH: Allows you to access Linux instance through your terminal

  • PostgreSQL: Allows incoming requests for PostgreSQL server

To create a security group for your instance in the launch template,

  1. Navigate to your AWS EC2 dashboard.

  2. Under "Network & Security", select "Security Groups"

  3. Select "Create security group"

  4. Security group name (Example): PostgreSQL Server Security

  5. Description (Example): Allow PostgreSQL

  6. VPC: Select VPC for your instance

  7. Security group rules (Inbound): Select add rule and add the following:

    1. SSH: For source, choose "Anywhere"

    2. PostgreSQL: For source, choose "Anywhere"

  8. You do not need to change the outbound settings.

  9. Tags: Skip tags

  10. Select "Create Security Group"

Your security group for your PostgreSQL server is ready to be added to your launch template.

PreviousOverviewNextCreate Launch Template

Last updated 4 years ago

Was this helpful?