보안 그룹·NACL
보안 그룹은 인스턴스 방화벽(상태 저장), NACL은 서브넷 방화벽(무상태)
이게 뭔가요? / What is this?
보안 그룹과 NACL은 눈에 보이는 방화벽 장비가 아니라, 누구를 들여보내고 막을지 정해두는 가상의 규칙 목록입니다. 보안 그룹은 한 번 들어온 손님을 나갈 때 다시 검사하지 않는 아파트 현관 경비원(상태 저장)에 가깝고, NACL은 들어올 때든 나갈 때든 매번 명단을 확인하는 건물 정문 경비(무상태)에 가깝습니다.
개요 / Overview
두 계층의 차이를 묻는 문제가 반복 출제됩니다. 보안 그룹은 허용 규칙만 있고 상태를 기억하며, NACL은 허용·거부 규칙이 모두 있고 상태를 기억하지 않아 인바운드·아웃바운드를 각각 열어야 합니다.
동작 원리 / How it works
보안 그룹은 ENI에 붙는 상태 저장 방화벽입니다. 인바운드를 허용하면 그 연결의 응답 트래픽은 아웃바운드 규칙과 무관하게 자동으로 나갑니다. 규칙은 허용만 존재하고, 모든 규칙의 합집합이 적용되며, 소스로 CIDR 대신 다른 보안 그룹을 지정할 수 있습니다.
NACL은 서브넷 경계의 무상태 방화벽입니다. 상태를 기억하지 않으므로 인바운드와 아웃바운드를 각각 열어야 하고, 응답 트래픽을 위해 임시 포트 범위(1024-65535) 아웃바운드가 필요합니다. 규칙은 번호 순서로 평가되어 처음 일치하는 규칙이 결정하며, 거부 규칙을 쓸 수 있는 유일한 계층입니다.
시험은 무엇을 보는가 / What the exam is testing
시험은 이 둘의 차이를 직접 묻거나, 접근 실패의 원인을 진단하게 합니다. "인바운드는 열었는데 응답이 안 온다"는 NACL의 임시 포트 문제이고, "특정 IP만 차단하라"는 보안 그룹으로 불가능해 NACL이 정답입니다. 계층 간 통신은 보안 그룹을 소스로 참조하는 것이 최소 권한 정답입니다.
시험 포인트 / Exam points
보안 그룹은 인바운드를 허용하면 응답 아웃바운드가 자동 허용됩니다. NACL은 그렇지 않아 응답 트래픽용 임시 포트(1024-65535) 아웃바운드 규칙이 따로 필요합니다.
보안 그룹에는 거부 규칙이 없습니다. "특정 IP를 차단하라"는 요구는 NACL의 Deny 규칙이 정답입니다.
웹 티어 보안 그룹을 DB 보안 그룹의 소스로 지정하면 IP를 몰라도 계층 간 통신만 허용됩니다. 최소 권한 네트워크 설계의 정석입니다.
자주 틀리는 함정 / Common traps
보안 그룹에 거부 규칙을 추가하는 선택지 — 존재하지 않는 기능입니다.
NACL에서 인바운드만 열고 아웃바운드 임시 포트를 잊는 것 — 요청은 들어오지만 응답이 나가지 못합니다.
Security Group / NACL
Security groups are stateful instance firewalls; NACLs are stateless subnet firewalls
이게 뭔가요? / What is this?
Security groups and NACLs are not physical firewall boxes — they are virtual rule lists that decide who gets in and who gets blocked. A security group is like an apartment door guard who does not re-check a guest on the way out once let in (stateful); a NACL is like a building front gate guard who checks the list every single time, coming or going (stateless).
개요 / Overview
The distinction is tested repeatedly. Security groups only allow and are stateful; NACLs allow and deny, are stateless, and require both inbound and outbound rules.
동작 원리 / How it works
A security group is a stateful firewall on the ENI. Allowing inbound automatically permits that connection's return traffic regardless of outbound rules. Only allow rules exist, all rules union together, and a source can be another security group instead of a CIDR.
A NACL is a stateless firewall at the subnet boundary. Keeping no state, it needs inbound and outbound opened separately, including outbound ephemeral ports 1024–65535 for replies. Rules evaluate in number order, first match wins, and it is the only layer with deny rules.
시험은 무엇을 보는가 / What the exam is testing
The exam asks the difference directly or makes you diagnose a failure. "Inbound is open but replies never arrive" is a NACL ephemeral-port problem. "Block one specific IP" is impossible with security groups, so NACL is the answer. Tier-to-tier traffic is best expressed by referencing the source security group.
시험 포인트 / Exam points
A security group automatically allows the reply to an allowed inbound flow. A NACL does not, so you must add an outbound rule for ephemeral ports 1024–65535.
Security groups have no deny rule. "Block a specific IP address" is answered by a NACL deny rule.
Using the web tier's security group as the source in the database's rule permits tier-to-tier traffic without hard-coded IPs — the least-privilege pattern.
자주 틀리는 함정 / Common traps
Adding a deny rule to a security group — no such feature exists.
Opening only inbound on a NACL and forgetting outbound ephemeral ports — requests arrive but replies cannot leave.
AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.