> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Demo Creating security group

> This guide explains how to create a security group for Amazon Elastic Container Service applications, including configuration steps and best practices.

In this guide, we will walk you through creating a security group for your [Amazon Elastic Container Service (AWS ECS)](https://learn.kodekloud.com/user/courses/amazon-elastic-container-service-aws-ecs) application. A security group acts as a virtual firewall that controls network traffic for your devices. While this example uses a very basic rule, remember to configure only the necessary traffic for production environments.

## Steps to Create a Security Group

1. Navigate to the [EC2 Dashboard](https://learn.kodekloud.com/user/courses/amazon-elastic-compute-cloud-ec2) and locate the Security Groups section.
2. Open the Security Groups page in a new browser tab to simplify navigation.
3. Click on **Create Security Group** to begin the configuration.
4. Set the security group name to "ECS SG" and add a description, for example, "ECS security group".
5. Add an inbound rule that allows all traffic from any IP.

<Callout icon="triangle-alert" color="#FF6B6B">
  Allowing all traffic is not recommended for production. It is best to define explicit rules that permit only the required traffic.
</Callout>

6. Ensure that the security group is associated with the correct VPC—the one hosting your ECS cluster.
7. Review your settings and click **Create Security Group** to complete the process.

By following these steps, you have successfully created a basic security group for your AWS ECS application. You can later update these rules to restrict access further as your application requirements evolve.

<Callout icon="lightbulb" color="#1CB2FE">
  For more in-depth information on AWS ECS and best practices for security configurations, consider exploring the [AWS ECS Documentation](https://learn.kodekloud.com/user/courses/amazon-elastic-container-service-aws-ecs).
</Callout>

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/amazon-elastic-container-service-aws-ecs/module/5d992c10-db1a-4e88-91f3-83c23d3595d0/lesson/a58dd49b-d5f8-4f03-9f00-d23d61ac9883" />
</CardGroup>
