진취적 삶
섹션4 IAM 및 AWS CLI 본문
IAM
IAM = Identify and Access mangement
글로벌 관점이여서 region 선택이 필요없음
그룹은 only 유저만 포함가능하다 . 다른 그룹은 안됨
유저는 그룹에 속하지 않을수도 있고, 다양한 그룹에 속할수도있다.
json 형태의 문서로 사용자들이 aws 서비스를 이용하도록 허용하는것
aws 는 최소 권한의 원칙을 적용한다
least privilege principle
don’t give more permissions than a user needs
루트 계정보다는 별도의 관리자 계정을 만드는것이 좋다.
iam login
i am 에 들어가서 새로운 계정 하나 만들면됨
로그인 할때는 대쉬보드에 들어가서 url 넣으면 iam 으로 로그인 가능
IAM Policies Structure
구성요소
- version
- id
- statement
statement 구성 요소
- Sid : identifier for the statement
- Effect : allow or deny
- Principal : account/ user/role to which this policy appiled to
- Action : effect 에 기반해 허용 /거부 되는 API의 호출 목록
- Resource 는 적용될 action 의 리소스의 목록
{
"Version" : "2012-10-17" ,
"Id" : "S3-Account-Permissions",
"Statement" : [
{
"Sid":"1",
"Effect":"Allow",
"Principal": {
"AWS": ["arn:aws:iam::123456789:root"]
},
"Action":[
"s3:GetObject",
"s3:PutObject"
],
"Resource":["arn:aws:s3:::mybucket/*"]
}
]
}
IAM - Password Policy
사용자들의 정보가 침해당하지 않도록 보호
강한 비밀번호 설정하도록함
- 최소 길이설정
- 비밀번호 재사용 불가하도록 가능
- 비빌번호 변경에 기간 넣기
Multi Factor Authentication -MFA
루트 계정과 IAM 사용자들을 무조건적을 보호해야함
MFA = password you know + security device you own
MFA 장점
패스워드가 누출되어도 로그인을위해 device 의 접근이 필요함
MFA devices options in AWS
- virtual MFA device (google Authenticator)
- Universal 2nd Factor (U2F) security key
- hardware key fob MFA Device
- Hardware Key Fob MFA Device for AWS GovCloud
how can users access AWS?
- AWS management console
- AWS Command Line Interface (CLI)
- AWS software developer kit(SDK)
Access key 는 비밀
AWS SDK
- Language-sprcific APIs (set of libraries)
- Enables you to access and manage AWS services programmatically
- Embedded within your application
AWS CLI 설치
AWS cloudShell
aws 내에서 CLI 사용하는거
특정 Region 에서만 가능
업로드 및 다운로드 가능
IAM Roles for services
IAM Roles : 실제 사람이 사용하도록 만들어진것이 아니고 aws 서비스에 의해 사용되도록 만들어졌다.
AWS Services role 만들기 가능
IAM Security Tools
- IAM Credentials Report (account-level) a report taht lists all your account’s users and the status of their various credentials
- IAM Access Advisor(user-level) Access advisor shows the service permissions granted to a user and when those services were last accessed .
IAM 모범 사례
루트 계정은 AWS 계정을 설정할 때를 제외하고 사용하지 말기
하나의 AWS 사용자는 하나의 AWS USER
비밀번호 정책 Strong 하게
create and use Roles for giving permissions to AWS services
never share IAM users & Access Keys
IAM 정리
- Users: mapped to a physical user, has a password for AWS Console
- Groups : contains users only
- Policies : JSON document that outlines permissions for users or groups
- Roles : for EC2 instances or AWS services
- Security:MFA + password Policy
- Access Keys : access AWS using the CLI or SDK
- Audit : IAM Credential Reports & IAM Access Advisor
'AWS SAA' 카테고리의 다른 글
섹션 11 클래식 솔루션 아키텍처 토론 (0) | 2023.07.15 |
---|---|
섹션 1 AWS 공인 SAA (0) | 2023.07.15 |
섹션3 AWS 시작하기 (0) | 2023.07.15 |
섹션5 EC2 기초 (0) | 2023.07.15 |
섹션6 EC2-솔루션스 아키텍트 어소시에트 레벨 (0) | 2023.07.15 |