Cognito 인증

보안 및 IAM 연관 문항 11개

앱 사용자의 가입·로그인·소셜 연동을 담당

이게 뭔가요? / What is this?

Cognito는 직원용 출입 시스템이 아니라, 내 앱을 쓰는 일반 고객들의 회원가입·로그인을 대신 처리해 주는 관리형 서비스입니다. IAM이 회사 직원 출입증을 관리하는 것이라면, Cognito는 매장 앞의 회원가입 데스크이자 로그인 창구로, 서로 다른 사람들을 대상으로 한다는 점이 핵심입니다.

개요 / Overview

Cognito는 최종 사용자(고객) 인증을 처리합니다. IAM이 AWS 리소스 접근을 다루는 반면 Cognito는 모바일·웹 앱의 회원을 다룬다는 점이 핵심 구분입니다.

동작 원리 / How it works

Cognito는 두 부분입니다. 사용자 풀은 회원 디렉터리로 가입·로그인·MFA·비밀번호 정책을 처리하고 성공 시 JWT(ID·액세스·리프레시 토큰)를 발급합니다. 자격 증명 풀은 그 토큰이나 소셜 IdP 토큰을 받아 STS로 임시 AWS 자격 증명으로 교환해, 모바일 앱이 자기 몫의 S3 접두사에만 접근하는 식의 세분화된 권한을 가능하게 합니다.

사용자 풀은 API Gateway 권한 부여자로 직접 연결할 수 있어, 토큰 검증 코드를 짜지 않고도 API를 보호할 수 있습니다.

시험은 무엇을 보는가 / What the exam is testing

시험은 IAM과 Cognito의 경계를 묻습니다. AWS 리소스를 쓰는 직원·서비스는 IAM, 애플리케이션의 최종 사용자는 Cognito입니다. "수백만 모바일 사용자 로그인", "구글 계정으로 로그인"이 Cognito 신호입니다.

시험 포인트 / Exam points

사용자 풀 vs 자격 증명 풀

사용자 풀은 가입·로그인 디렉터리로 토큰을 발급합니다. 자격 증명 풀은 그 토큰을 임시 AWS 자격 증명으로 바꿔 앱이 S3 등에 직접 접근하게 합니다.

소셜·기업 로그인

Google·Facebook·Apple 소셜 로그인과 SAML 기업 IdP 연동을 지원합니다. "사용자가 구글 계정으로 로그인하게 하라"의 정답입니다.

자주 틀리는 함정 / Common traps

앱 사용자마다 IAM 사용자를 만드는 선택지 — 확장되지 않으며 IAM 사용자 수 제한에 걸립니다.

📝 이 개념 문제 풀기

Amazon Cognito

Security & IAM 11 related questions

Sign-up, sign-in, and social federation for application users

이게 뭔가요? / What is this?

Cognito is not an employee access system — it is a managed service that handles sign-up and sign-in for the everyday customers using an app. If IAM manages employee badges for staff, Cognito is the membership desk and login counter out front for the public — the key distinction is who each one is meant for.

개요 / Overview

Cognito authenticates end users of your application. The key distinction: IAM governs access to AWS resources, while Cognito manages the members of your mobile or web app.

동작 원리 / How it works

Cognito has two halves. A user pool is the member directory handling sign-up, sign-in, MFA, and password policy, issuing JWTs (ID, access, refresh) on success. An identity pool exchanges those tokens — or social IdP tokens — for temporary AWS credentials via STS, enabling fine-grained access such as a mobile app reaching only its own S3 prefix.

A user pool can attach directly as an API Gateway authorizer, protecting an API with no token-validation code of your own.

시험은 무엇을 보는가 / What the exam is testing

The exam probes the IAM/Cognito boundary: employees and services using AWS resources are IAM; end users of your application are Cognito. "Millions of mobile users signing in" or "sign in with Google" signals Cognito.

시험 포인트 / Exam points

User pools vs identity pools

A user pool is the sign-up directory issuing tokens; an identity pool exchanges those tokens for temporary AWS credentials so the app can reach S3 directly.

Social and enterprise login

Supports Google, Facebook, and Apple sign-in plus SAML enterprise IdPs — the answer to "let users sign in with their Google account".

자주 틀리는 함정 / Common traps

Creating an IAM user per application user — it does not scale and hits IAM user limits.

📝 Practice this concept

AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.