Last updated Oct 22, 2022

Introduction to security groups in AWS

Introduction to security groups in AWS

Introduction to security groups in AWS

What are Security groups in AWS?

The Security groups are the fundamentals of network security in AWS.

Basically, they control how traffics is allowed into or out of your EC2 instances.

By using security groups we can set allow rules(can be referenced by IP or by another security group) in AWS, so here we can configure which things should be allowed for the specific instances.

In simple terms, we can say the security groups work as a "firewall" for your EC2 instance.

Sample Image of Seciryr Group:

What is the inbound and outbound rule?

The Inbound rules are the rules that allow connectivity from the outside into the EC2 instance.

Here we mostly configure SSH, HTTP, and HTTPS (to allow access to your site from a browser URL)rules.

Things to know:

1) One Security group can be attached to multiple ec2 instances

2) One EC2 instance can have multiple security groups attached

3) Seciruty group Limited to a region or VPC combination

In case you switch the region or create a new VPC then you have to create a new security group for it.

4) All inbound traffic is blocked by default

5) All outbound traffic is Authorized by default

Some Advice:

It's good to maintain one separate security group for SSH access.

Troubleshooting:

If your application is not accessible or returning time out the issue then, most probably it's a security group issue.

In this situation, go to your security group configaution and verify if is it properly configured or not.

Some common PORTS to Know:

22 -> SSH(Secure shell) - Will allow you to log in to your Linux instances

21 -> FTP (File Transfer Protocol) - Upload files into your server using some client like Filezilla

22 -> SFTP(Secure File Transfer Protocol) - Upload file using SSH

80 -> HTTP - access unsecurd websites

443 -> HTTPS - Access secured websites

3389 -> RDP(Remote Desktop Protocol) - Allow login to windows instance

Tags

Available for projectsLet’s build together

Need this built properly,
not just explained?

I take on Angular and NestJS work directly — auth systems, multi-tenant SaaS, API rewrites and the deploy pipeline underneath them. You talk to the person writing the code.

Projects delivered
20+ Projects delivered
Angular • NestJS
7+ years Angular • NestJS
Average reply time
1 day Average reply time

What I can help with

  • Auth and permissions systems
  • Multi-tenant SaaS foundations
  • API design and rewrites
  • Deploy pipelines and VPS setup
  • Bug fixing and performance optimization
Send me a message

Tell me about your project and I’ll get back with a realistic scope and price.

Turn
Your Ideas
Into Reality

Stay in the loop

Get the finished tutorials, projects and resources in your inbox.

Join 5,000+ developers and get new tutorials, source code, product updates and exclusive content — straight to your inbox.

  • No spam
  • Useful content only
  • Unsubscribe anytime

Subscribe to TutsCoder

Be the first to get new tutorials, projects and tips.

Join 5,000+ developers already learning with us.

Learn
Build
Grow

Discussion

0 comments

Share your thoughts, ask questions or suggest improvements. Let’s learn and grow together!

No comments yet — be the first to start the discussion.

Join the discussion

Sign in to join the discussion. Your account also keeps your saved tutorials and path progress.