KMS 키 관리
암호화 키의 생성·보관·교체를 맡는 관리형 서비스
이게 뭔가요? / What is this?
KMS는 물리적인 금고가 아니라, 암호화에 쓰는 키를 만들고 보관하고 교체하는 일을 대신해 주는 관리형 서비스입니다. 개인 금고를 사서 직접 관리하는 대신, 열쇠 제작과 보관, 정기적인 자물쇠 교체까지 전부 대행해 주는 보안 업체를 이용하는 것과 비슷합니다.
개요 / Overview
KMS는 대부분의 AWS 서비스와 통합되어 저장 데이터 암호화를 담당합니다. 시험에서는 AWS 관리형 키와 고객 관리형 키(CMK)의 차이, 자동 교체, 키 정책이 핵심입니다.
동작 원리 / How it works
KMS의 핵심 개념은 봉투 암호화입니다. KMS 키(CMK)는 절대 서비스를 떠나지 않고, 대신 데이터 키를 발급합니다. 서비스는 이 데이터 키로 실제 데이터를 암호화하고, 데이터 키 자체는 CMK로 암호화해 데이터 옆에 저장합니다. 복호화할 때는 암호화된 데이터 키를 KMS에 보내 풀어 달라고 요청합니다. 이 구조 때문에 KMS 직접 암호화는 4KB로 제한되지만 실질적으로는 크기 제한이 없습니다.
접근 통제는 키 정책과 IAM 정책 두 층입니다. 키 정책은 키 자체에 붙는 리소스 정책으로, 여기에 허용되지 않은 주체는 IAM에서 아무리 허용해도 쓸 수 없습니다 — "S3 접근 권한은 있는데 객체를 못 읽는다"는 문제의 흔한 원인입니다.
시험은 무엇을 보는가 / What the exam is testing
시험은 KMS로 "키를 누가 통제하는가"를 묻습니다. AWS 관리형 키로 충분한가, 고객 관리형 키가 필요한가(정책 통제·교체 주기·감사·비활성화), 아니면 CloudHSM까지 가야 하는가(전용 하드웨어, AWS도 접근 불가, FIPS 140-2 레벨 3)입니다.
시험 포인트 / Exam points
키 정책을 직접 통제하고, 교체 주기를 정하고, 감사 추적을 남기고, 필요하면 키를 비활성화해 데이터를 즉시 접근 불가로 만들 수 있습니다. "키를 통제해야 한다"는 요구의 정답입니다.
고객 관리형 키는 연 1회 자동 교체를 켤 수 있고 이전 키 자료는 보관되어 옛 데이터도 계속 복호화됩니다. 더 짧은 주기가 필요하면 수동 교체합니다.
FIPS 140-2 레벨 3 전용 하드웨어나 키를 AWS조차 접근 못 하게 해야 하는 규제가 있으면 CloudHSM입니다. 그 외에는 KMS가 운영 부담이 훨씬 적습니다.
KMS는 데이터 키를 발급하고 그 키로 실제 데이터를 암호화합니다. 4KB를 넘는 데이터는 직접 암호화하지 않고 이 방식을 씁니다.
자주 틀리는 함정 / Common traps
키 정책을 무시하고 IAM 정책만 넓히는 선택지 — 키 정책에 주체가 없으면 여전히 실패합니다.
리전 간 복제 시 대상 리전의 키를 준비하지 않는 것 — KMS 키는 리전 스코프이므로 대상 리전 키가 필요합니다(또는 다중 리전 키).
AWS KMS
Managed creation, storage, and rotation of encryption keys
이게 뭔가요? / What is this?
KMS is not a physical vault — it is a managed service that creates, stores, and rotates the cryptographic keys used for encryption on your behalf. Rather than buying and managing a personal safe, it is like hiring a security firm that cuts the keys, stores them, and periodically changes the locks.
개요 / Overview
KMS integrates with most AWS services to encrypt data at rest. The exam focuses on AWS-managed versus customer-managed keys, automatic rotation, and key policies.
동작 원리 / How it works
The central idea is envelope encryption. The KMS key never leaves the service; instead it issues a data key. The service encrypts your payload with that data key, then stores the data key encrypted under the KMS key alongside the data. Decryption sends the wrapped data key back to KMS to unwrap. This is why direct KMS encryption is capped at 4 KB yet there is effectively no size limit.
Access has two layers: the key policy and IAM policies. The key policy is a resource policy on the key itself, and a principal it does not admit cannot use the key no matter what IAM allows — a common cause of "I have S3 permissions but cannot read the object".
시험은 무엇을 보는가 / What the exam is testing
KMS questions ask who controls the key: is an AWS-managed key enough, is a customer-managed key needed (policy control, rotation, audit, disable), or must it be CloudHSM (dedicated hardware, inaccessible to AWS, FIPS 140-2 Level 3)?
시험 포인트 / Exam points
They let you control the key policy, set rotation, audit usage, and disable the key to make data instantly inaccessible — the answer to "we must control the keys".
Customer-managed keys can rotate annually while retaining old key material so older data still decrypts. Shorter intervals require manual rotation.
FIPS 140-2 Level 3 dedicated hardware, or a requirement that AWS cannot access the key, means CloudHSM. Otherwise KMS carries far less overhead.
KMS issues a data key that encrypts the payload; anything larger than 4 KB uses this envelope approach rather than direct KMS encryption.
자주 틀리는 함정 / Common traps
Widening only the IAM policy while ignoring the key policy — without the principal in the key policy it still fails.
Replicating cross-Region without a key in the destination — KMS keys are Region-scoped, so the target Region needs its own key (or a multi-Region key).
AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.