top of page
new-hero.png

What Are AWS Security Groups?

Watch a video

AWS Security Groups are the stateful, instance-level firewalls that make or break your cloud perimeter. They filter traffic on the way in and out of every elastic network interface (ENI), scale automatically with your workloads—supporting PCI DSS network segmentation—and can shrink audit scope and risk.

This page explains how they work, why they differ from Network ACLs, what's new (cross-VPC sharing), and how AlgoSec Cloud Enterprise delivers continuous policy hygiene across hundreds of VPCs.

unnamed.png

How Do AWS Security Groups Work?

Security groups (SGs) are virtual firewalls attached to ENIs in a virtual private cloud (VPC). They evaluate inbound rules first, allow stateful return traffic automatically, and then apply outbound rules—all before packets hit the guest OS firewall.

Key behaviors:

Allow

Deny

yes

yes

Before packet leaves ENI

Before packet enters ENI

Outbound

Inbound

Rule Type

Default Action

Stateful

Security Groups ( SGs)

Because SGs are stateful, you rarely need symmetric rules—responses are automatically allowed. By default, you can attach up to five SGs per ENI, giving you additive rule stacks for layered controls.

Why Are AWS Security Groups Important?

AWS security groups are critical because they enforce least-privilege, stateful filtering at the instance edge, blocking unauthorized traffic before it ever reaches your workload. The 2019 Capital One breach started with an SSRF exploit that punted traffic through an over-permissive SG/WAF combo; 100 million records later, the lesson was clear—least-privilege SGs matter for PCI DSS network segmentation compliance.

When it comes to PCI network segmentation audits, AWS security groups let you create explicit, least-privilege boundaries around every cardholder-facing workload.

Using Multiple AWS Security Groups

Attaching more than one security group (SG) per ENI lets you layer responsibilities—platform, application, and third-party traffic—without ballooning the rule count in any single SG. AWS simply merges every rule across the attached groups into one effective allow-list; there is no concept of rule precedence or hidden denies.

Rule union, not override: If SG-A allows TCP 22 and SG-B allows TCP 443, the instance will listen on both ports. Removing a port means removing it from every SG where it appears.

Operations Checklist

  • Tag everything with owner, env, and purpose; you'll thank yourself during audits and cost allocations.

  • Watch for overlapping CIDRs—they multiply unintentionally when rules live in different SGs.

  • Automate drift checks in CI/CD; any unauthorized console edit in a stacked security group can instantly alter the effective policy.

  • Request higher SG-per-ENI limits before you need them; AWS approval isn't instant.

  • Document the stack in runbooks so incident responders know which SG to configure (or not).

Pro tip: For PCI network segmentation workloads, dedicate one SG to all PCI network segmentation rules and keep it read-only. Your Qualified Security Assessor (QSA) can audit a single file instead of searching through every microservice repository.

Security Groups vs. Network ACLs for PCI Network Segmentation

When a packet hits metal in AWS, two different bouncers can toss or pass it: Security groups (SGs) at the elastic-network-interface (ENI) layer and network ACLs (NACLs) at the subnet edge. Know what each one does so you don't build overlapping rules and accidental holes.

Coarse subnet guardrails, country/IP blocks, extra layer for PCI DSS network segmentation compliance

All traffic denied unless rules explicity allow it

Lowest rule number is evaluated first; order matters

Numbered Allow or Deny lines; first-match wins

Fine - grained micro-segmentation, zero-trust tiers, PCI network segmentation

All inbound blocked, all outbound allowed until changed

AWS takes the union of all SG rules; no priorities to track

Allow only (implicit deny for everything else )

Ideal Use

Evaluation Order

Default Behavior

Rule Actions

No-must write matching rules for both directions

Applied to the entire subnet edge

Stateful

Layer/Scope

Yes - return traffic automatically allowed

Attached to each elastic network interface (instance-level)

Security Groups ( SGs)

Feature

Network ACLs (NACLs)

Think of SGs as the tight turnstiles right at the workload door and NACLs as the perimeter fence around the parking lot. Use both, but for different jobs; your cloud will remain tidy, audit-ready, and resilient:

unnamed (1).png

Why This Matters for PCI DSS Network Segmentation

PCI DSS emphasizes strong, documented segmentation between the cardholder data environment (CDE) and everything else. SGs give you per-instance micro-segmentation, while ACLs provide an outer guardrail, satisfying default-deny, explicit-allow requirements.

New AWS Security Group Functionalities

AWS has added several quality-of-life upgrades that make security-group hygiene less painful and far more automation-friendly:

  • Security-group VPC associations: Attach the same SG to several VPCs within a single region. Maintaining one "golden" rule set instead of cloning SGs per VPC eliminates policy drift and simplifies CI/CD pipelines.

  • Shared security groups: Participant accounts in a Shared-VPC architecture can reuse SGs owned by the host account. Every team sees (and inherits) the exact rules the network team approved. This gives you centralized control without blocking decentralized builds.

  • Cross-VPC security group referencing (via AWS Transit Gateway): A security group in one VPC can name an SG in another VPC as its source or destination. You can build hub-and-spoke or spoke-to-spoke traffic filters without configuring CIDRs everywhere, tightening cross-region segmentation.

AlgoSec for PCI Network Segmentation with AWS Security Groups

Managing security groups is easy when you have a dozen; it's a different story when juggling hundreds across multiple accounts, regions, and VPCs. That's where AlgoSec provides the context, automation, and guardrails you need for PCI network segmentation audits without slowing delivery:

  • Unified SG inventory: Auto-discovers every security group across accounts for one-screen visibility.

  • Continuous risk checks: Flags open CIDRs, unused groups, and over-broad ports before production—giving application owners instant, actionable insight.

  • Zero-touch change push: Generate, approve, and apply SG updates straight from CI/CD.

  • One-click compliance packs: Exports ready-to-submit reports for PCI DSS, HIPAA, and GDPR.

  • Optimization hints: Suggests merges, rule clean-ups, and NACL offloads to stay under quotas.

  • Migration Wizard: Converts legacy firewall rules into matching SG policies in minutes.

  • Hybrid-cloud scale: Secures AWS, Azure, GCP, and on-prem firewalls from the same console—see real-world patterns in AWS and AlgoSec.

Putting It All Together

Security groups are your first—and sometimes last—line of defense in AWS. By combining layered SG design, complementary network ACL guardrails, and tooling like AlgoSec for continuous assurance, you create a security posture that scales as fast as your engineering teams deploy. This keeps you audit-ready for PCI DSS network segmentation at any size.

Resources

Learn from the experts. Get the latest industry insights

Simplify Zero Trust with application - based segmentation- Whitepaper

Simplify Zero Trust with application - based segmentation- Whitepaper

Short tutorial- Learn how to build Zero Trust architecture

Short tutorial- Learn how to build Zero Trust architecture

Zero Trust webinar with Forrester and AlgoSec CTO

Zero Trust webinar with Forrester and AlgoSec CTO

Mapping the Zero Trust Model with AlgoSec’s solution

Mapping the Zero Trust Model with AlgoSec’s solution

Schedule time with a Zero Trust expert

bottom of page