# Create Security Group

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.

{% embed url="<https://youtu.be/tkUcoGJ8Ob0>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aws-postgresql-docs.beliciarodriguez.com/launching-instance/aws-security-group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
