Slide 1

Slide 1 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. 7 Effective AWS Sungmin Kim Solutions Architect AWS

Slide 2

Slide 2 text

© 2022, Amazon Web Services, Inc. or its affiliates. In this talk • Item #1: IAM • Item #2: VPC • Item #3: Security Group • Item #4: CloudTrail • Item #5: S3 • Item #6: ChatOps for Slack and Chime • Item #7: AWS Documents

Slide 3

Slide 3 text

© 2022, Amazon Web Services, Inc. or its affiliates. We are all DevOps Engineers

Slide 4

Slide 4 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Identity and Access Management

Slide 5

Slide 5 text

© 2022, Amazon Web Services, Inc. or its affiliates. 안전한 AWS 사용을 위한 IAM 서비스에 대한 최소 권장 사항 • Root 사용자를 절대 사용하지 말자! • 권한 위임을 위해서 IAM Users 보다 User Groups 또는 Roles을 사용하자! • IAM User의 Access Key ID / Secret Access Key를 소스 코드에 넣지 말자! • 최소한의 권한(Least Privilege)을 부여하자! https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html

Slide 6

Slide 6 text

© 2022, Amazon Web Services, Inc. or its affiliates. The AWS Account Root User Billing Information Personal data Full access to ALL AWS services and resources Do not use the Root Account Credentials! Protect the credentials https://aws.amazon.com/ko/blogs/startups/founder-security-fundamentals-improved-security-with-identity-and-access-management/ AWS 계정 Root 사용자 Access Keys 잠금

Slide 7

Slide 7 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM (Identity and Access Management) Concept IAM Users Permissions (IAM Policy) Access Keys (Access Key ID/ Secret Key) Temporary Security Credentials Who Can access What Principals Authentication Authorization AWS Resources IAM Roles AWS Account Amazon EC2 Amazon S3 Amazon DynamoDB AWS Lambda

Slide 8

Slide 8 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM User Groups Group에 속한 IAM User에게 한꺼번에 IAM 권한을 부여한다. IAM Group에는 Access Keys가 없다. Access Keys (Access Key ID / Secret Access Key)

Slide 9

Slide 9 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM Users vs. Groups IAM User에게 권한 부여 • 사용자의 권한 추가 및 제거 등 관리가 어렵다. • 권한의 수정 및 삭제가 어렵다. • Access Keys 노출 시, 대응이 어렵다. IAM User Group에 권한 부여 • 사용자의 권한 추가 및 제거 등 관리가 쉽다. • 권한의 수정 및 삭제가 쉽다. • Access Keys 노출 시, 비교적 쉽게 대응할 수 있다. Developers Group Test Group IAM User Groups 또는 Role을 사용하여 권한 위임

Slide 10

Slide 10 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM Users vs. Groups Admin Users Group Administrator 일반 사용자를 관리자로 승격 시키는 경우 개발자 권한 ⊂ 관리자 권한 Developer 필요없는 권한을 많이 갖을 수 있다. (최소 권한 부여 원칙 위배) IAM User Groups 또는 Role을 사용하여 권한 위임

Slide 11

Slide 11 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM Users vs. Roles IAM Role 사용자(Human User)가 아닌 다른 Entity에 권한을 주고 싶을 때 권한을 직접 부여 IAM Policy IAM Policy AWS Resources Amazon EC2 AWS Lambda AWS Resources User User Group Amazon EC2 AWS Lambda 권한을 위임 권한의 위임 체계를 지원하기 위한 용도 IAM User Groups 또는 Role을 사용하여 권한 위임

Slide 12

Slide 12 text

© 2022, Amazon Web Services, Inc. or its affiliates. Access Keys vs. IAM Role IAM User Long-term security credential Amazon S3 IAM User Long-term security credential Amazon EC2 Amazon S3 Role Temporary security credential Role Lambda function Temporary security credential 상시 자격 증명 (Access Key ID / Secret Access Key)이 부여됨 임시 자격 증명이 부여됨 Access Keys 공유 금지 * Access Keys - ( Access Key ID, Secret Access Key)

Slide 13

Slide 13 text

© 2022, Amazon Web Services, Inc. or its affiliates. Amazon EC2 인스턴스에서 실행되는 Application에 IAM Role 사용 https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html Access Keys 공유 금지

Slide 14

Slide 14 text

© 2022, Amazon Web Services, Inc. or its affiliates. git-secrets 를 이용해서 Access Keys 노출 방지 Prevents you from committing passwords and other sensitive information to a git repository. password\s*=\s*.+ matched, but allowed literal password\s*=\s*.+ matched, and not allowed literal https://github.com/awslabs/git-secrets Access Keys 공유 금지

Slide 15

Slide 15 text

© 2022, Amazon Web Services, Inc. or its affiliates. IAM (Identity and Access Management) Concept IAM Users Permissions (IAM Policy) Access Keys (Access Key ID/ Secret Key) Temporary Security Credentials Who Can access What Principals Authentication Authorization AWS Resources IAM Roles AWS Account Amazon EC2 Amazon S3 Amazon DynamoDB AWS Lambda 최소 권한 부여

Slide 16

Slide 16 text

© 2022, Amazon Web Services, Inc. or its affiliates. 최소 권한 부여

Slide 17

Slide 17 text

IAM Policy Components and Structure { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:*” ], “Resource”: “*”, “Condition”: { “StringEquals”: { “aws:RequestedRegion”: [ “us-east-1” ] } } } ] } Policy Elements • Effect • Action • Resource • Condition Allow(허용) or Deny(차단) ? 어떤 행위(Action)를? 어떤 객체(Resource)들에 대해서? 어떤 조건 (Condition)들을 만족하는 경우에? us-east-1 리전의 DynamoDB 서비스에 대해서 DynamoDB의 모든 action들을 허용 https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html 최소 권한 부여

Slide 18

Slide 18 text

IAM Policy를 좀더 상세하게 작성하기: Action { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:*” ], “Resource”: “*” } ] } { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:BatchGetItem”, “dynamodb:GetItem”, “dynamodb:Query”, ], “Resource”: “*” } ] } DynamoDB의 특정 action만을 허용 구체적으로 어떤 행위들을? 최소 권한 부여

Slide 19

Slide 19 text

IAM Policy를 좀더 상세하게 작성하기: Resource { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:BatchGetItem”, “dynamodb:GetItem”, “dynamodb:Query”, ], “Resource”: “*” } ] } { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:BatchGetItem”, “dynamodb:GetItem”, “dynamodb:Query”, ], “Resource”: [ “arn:aws:dynamodb:us-east-1::table/MyTableName”, “arn:aws:dynamodb:us-east-1::table/MyTableName/index/*”, ] } ] } DynamoDB의 지정된 테이블과 인덱스에 대해서 특정 action만을 허용 ARN (Amazon Resource Name) 형식으로 기술 최소 권한 부여

Slide 20

Slide 20 text

IAM Policy를 좀더 상세하게 작성하기: Condition { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:BatchGetItem”, “dynamodb:GetItem”, “dynamodb:Query”, ], “Resource”: “*” } ] } { “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “dynamodb:BatchGetItem”, “dynamodb:GetItem”, “dynamodb:Query”, ], “Resource”: “*”, “Condition”: { “StringEquals”: { “aws:RequestedRegion”: [ “us-east-1” ] } } } ] } us-east-1 리전의 DynamoDB 서비스에 대해서 DynamoDB의 특정 action만을 허용 최소 권한 부여

Slide 21

Slide 21 text

© 2022, Amazon Web Services, Inc. or its affiliates. 안전한 AWS 사용을 위한 IAM의 보안 모범 사례 • AWS 계정 Root 사용자 Access Keys 잠금 • IAM Role을 사용하여 권한 위임 • Access Keys (Access Key ID / Secret Access Key) 공유 금지 • Amazon EC2 인스턴스에서 실행되는 Application에 IAM Role 사용 • 최소 권한 부여 https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html Security best practices in AWS IAM

Slide 22

Slide 22 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. VPC

Slide 23

Slide 23 text

© 2022, Amazon Web Services, Inc. or its affiliates. VPC Public IP Address Private IP Address Subnet Mask Routing table NAT 10.0.0.0/16 10.0.0.0/24 10.0.1.0/24 Routing default 경로 8 bits x . x . x . x/8 x . x . x . x/16 x . x . x . x/24

Slide 24

Slide 24 text

© 2022, Amazon Web Services, Inc. or its affiliates. VPC를 이해하기 위해 반드시 알아야 할 개념 • IP 주소 = 네트워크부 + 호스트부 • Subnet Mask: CIDR (Classless Inter-Domain Routing) • 공인 IP 주소 vs. 사설 IP 주소 • NAT (Network Address Translation) • Router & Route table

Slide 25

Slide 25 text

© 2022, Amazon Web Services, Inc. or its affiliates. IP 주소의 표기 1100 0000 8 비트 1010 1000 8 비트 0000 0001 8 비트 0000 0001 8 비트 192 . 168 . 1 . 1 8 비트씩 10진수(0~255)로 변환하고 .(dot)로 구분한다.

Slide 26

Slide 26 text

© 2022, Amazon Web Services, Inc. or its affiliates. 1100 0000 Subnet Mask 8 비트 8 비트 8 비트 8 비트 1010 1000 0000 0001 0000 0001 1111 1111 1111 1111 1111 1111 0000 0000 네트워크부 호스트부 IP 주소 Subnet Mask 192 . 168 . 1 . 1 255 . 255. 255 . 0 네트워크부 호스트부 Subnet Mask의 Prefix 표기 /24 연속한 ‘1’과 연속한 ‘0’으로 네트워크부와 호스트부를 구분한다. 8 bits X . X . X . X / 8 X . X . X . X / 16 X . X . X . X / 24 앞에서부터 몇 개 비트가 ‘1’인지 표기한다. (CIDR)

Slide 27

Slide 27 text

© 2022, Amazon Web Services, Inc. or its affiliates. Subnet Mask 네 트 워 크 주 소 와 브 로 드 캐 스 트 주 소 192.168.1.0/24 ← 네트워크 주소 192.168.1.255 ← 브로드 캐스트 주소 192.168.1.2/24 192.168.1.3/24 192.168.1.1/24 같은 네트워크 상의 호스트 IP 주소는 네트워크부가 모두 동일하다 Broadcast 호스트부가 모두 비트 ‘0’ 호스트부가 모두 비트 ‘1’

Slide 28

Slide 28 text

© 2022, Amazon Web Services, Inc. or its affiliates. CIDR (Classless Inter-Domain Routing) 192.168. 1 .1/24 255.255.255.0 11111111.11111111.11111111.00000000 8 8 24 8 192.168.1.1/24 192.168.1.3/24 192.168.1.2/24 GS 타워 192.168.1.0/24 – 논현로 508 (Subnet) 네트워크 주소 IPv4 부족을 해결하기 위해서 유연하게 네트워크 영역을 나누는 방식 Caffe 증권사 앞에서부터 몇 개 비트가 ‘1’인지 표기한다.

Slide 29

Slide 29 text

© 2022, Amazon Web Services, Inc. or its affiliates. CIDR (Classless Inter-Domain Routing) 192.168. 1 .1/24 255.255.255.0 11111111.11111111.11111111.00000000 8 8 24 8 네트워크 주소 IPv4 부족을 해결하기 위해서 유연하게 네트워크 영역을 나누는 방식 앞에서부터 몇 개 비트가 ‘1’인지 표기한다. Subnet Bits(CIDR) # of hosts /16 65,534 /17 32,766 /18 18,382 /19 8,190 /20 4,094 /21 2,046 /22 1,022 /23 510 /24 254 /25 128 /26 62 /27 30 /28 14

Slide 30

Slide 30 text

© 2022, Amazon Web Services, Inc. or its affiliates. 공인 IP 주소 vs. 사설 IP 주소 인터넷 통신 불가 Private IP Address 대역 • 10.0.0.0 ~ 10.255.255.255 • 172.16.0.0 ~ 172.31.255.255 • 192.168.0.0 ~ 192.168.255.255 인터넷 (공인 IP 주소) 192.168.1.100 192.168.1.1 192.168.1.100 192.168.1.1 A 사 사내 네트워크 (사설 IP 주소) B 사 사내 네트워크 (사설 IP 주소) 223.130.195.200 A사의 사설 IP 주소와 중복되지만, B사 사내 통신에는 영향을 주지 않는다.

Slide 31

Slide 31 text

© 2022, Amazon Web Services, Inc. or its affiliates. NAT (Network Address Translation) Private IP: x.x.x.x Public IP: z.z.z.z Public IP: y.y.y.y IP 헤더 data IP 헤더 data IP 헤더 data IP 헤더 data 목적지 IP: x.x.x.x 출발지 IP: y.y.y.y 목적지 IP: y.y.y.y 출발지 IP: z.z.z.z 목적지 IP: z.z.z.z 출발지 IP: x.x.x.x 목적지 IP: z.z.z.z 출발지 IP: y.y.y.y Private IP Public IP x.x.x.x y.y.y.y 1 2 3 4

Slide 32

Slide 32 text

© 2022, Amazon Web Services, Inc. or its affiliates. Private IP: x.x.x.x Public IP: z.z.z.z Public IP: y.y.y.y IP 헤더 data 목적지 IP: y.y.y.y 출발지 IP: z.z.z.z Private IP Public IP ?.?.?.? y.y.y.y Q) VPC 외부에서 Private Subnet에 있는 EC2 인스턴스에 IP를 이용해서 접근할 수 있을까? x.x.x.x의 IP 주소를 알 수 없고, NAT Gateway의 Public IP 주소만 알고 있음 Private subnet 인터넷

Slide 33

Slide 33 text

© 2022, Amazon Web Services, Inc. or its affiliates. Router & Route table Router Route table 10.0.0.0/24 10.0.1.0/24 인터넷 * NW: Network Address SM: Subnet Mask NW/SM (Destination) Next Hop (Target) 10.0.0.1/16 local 0.0.0.0/24 igw-id

Slide 34

Slide 34 text

© 2022, Amazon Web Services, Inc. or its affiliates. Route table 경로 요약 Router 1 10.2.0.0/24 10.2.1.0/24 10.2.2.0/24 10.2.3.0/24 Router 2 10.0.0.1/24 10.0.0.2/24 NW/SM (Destination) Next Hop (Target) 10.2.0.0/24 10.0.0.2 10.2.1.0/24 10.0.0.2 10.2.2.0/24 10.0.0.2 10.2.3.0/24 10.0.0.2 NW/SM (Destination) Next Hop (Target) 10.2.0.0/16 10.0.0.2 IP 헤더 data 10.2.0.0/24~10.2.3.0/24로 가는 패킷은 Next Hop 10.0.0.2로 전송됨 Next Hop이 모두 공통이므로 원격 네트워크를 하나의 경로로 집약 R1의 Routing table

Slide 35

Slide 35 text

© 2022, Amazon Web Services, Inc. or its affiliates. Route table의 Default 경로 Router 1 Router 2 10.0.0.1/24 10.0.0.2/24 NW/SM (Destination) Next Hop (Target) 0.0.0.0/0 10.0.0.2 인터넷의 방대한 네트워크 주소를 집약해서 Default 경로를 Routing 테이블에 등록 R1의 Routing table 인터넷 100.0.0.0/8 200.1.1.0/24 150.1.0.0/16 Default 경로

Slide 36

Slide 36 text

© 2022, Amazon Web Services, Inc. or its affiliates. VPC 1 2 1 2 경로 요약 1 Default 경로 2 VPC (10.0.0.0/16) 를 하나의 경로로 집약 인터넷의 방대한 네트워크 주소를 집약해서 Default 경로로 집약 Private Subnet에서 인터넷으로 패킷을 보내기 위해서 Default 경로의 target을 NAT Gateway를 설정함

Slide 37

Slide 37 text

© 2022, Amazon Web Services, Inc. or its affiliates. Destination Target 10.0.1.0/24 Local 0.0.0.0/0 nat-instance-id Public Subnet에 패킷을 보낼 수 없음 Wrong route table Q1) VPC 내의 모든 EC2 인스턴스들은 어떻게 통신이 가능할까?

Slide 38

Slide 38 text

© 2022, Amazon Web Services, Inc. or its affiliates. Q2) Private Subnet의 EC2 인스턴스는 어떻게 외부 인터넷에 접속할 수 있을까? Destination Target 10.0.0.0/16 Local NAT Gateway에 대한 Routing 정보가 없기 때문에 NAT Gateway로 패킷을 보낼 수 없음 Wrong route table

Slide 39

Slide 39 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Security Group

Slide 40

Slide 40 text

© 2022, Amazon Web Services, Inc. or its affiliates. Security Group의 Inbound Rule 설정 사례 Amazon RDS (Primary) Amazon EC2 Amazon RDS (Replica) Security group (rds-server-sg) • Public IP: 198.51.100.1 • Private IP: 10.0.0.5 • Security Group ID: sg-xxxxxxxx Security group Type Protocol Port Source Description MySQL TCP ALL rds-server-sg RDS Cluster내 통신 MySQL TCP 3306 10.0.0.5/32 EC2 인스턴스 Security Group Name: rds-server-sg

Slide 41

Slide 41 text

© 2022, Amazon Web Services, Inc. or its affiliates. Security Group의 Inbound Rule 설정 사례 (문제점) 새 로 운 S O U R C E 가 추 가 될 때 마 다 S E C U R I T Y G R O U P 의 I N B O U N D R U L E S 을 변 경 해 야 함 Amazon RDS (Primary) Bastion Host Amazon RDS (Replica) Security group (rds-server-sg) Security group1 Security group2 WAS Office building Type Protocol Port Source Description MySQL TCP ALL rds-server-sg RDS Cluster내 통신 MySQL TCP 3306 10.0.0.5/32 Bastion Host MySQL TCP 3306 sg-xxxxxxxx WAS MySQL TCP 3306 198.51.10.0/24 Office building Security Group Name: rds-server-sg +

Slide 42

Slide 42 text

© 2022, Amazon Web Services, Inc. or its affiliates. Security Group의 Inbound Rule 설정 사례 (개선안) Amazon RDS (Primary) Amazon EC2 Amazon RDS (Replica) Security group (rds-server-sg) Security group2 (rds-client-sg) Security group1 Type Protocol Port Source Description MySQL TCP ALL rds-server-sg RDS Cluster내 통신 MySQL TCP 3306 rds-client-sg RDS Client SG Type Protocol Port Source Description Security Group Name: rds-client-sg Security Group Name: rds-server-sg ※ Inbound Rule은 비워둔다(empty)

Slide 43

Slide 43 text

© 2022, Amazon Web Services, Inc. or its affiliates. Security Group의 Inbound Rule 설정 사례 (개선안) Office building VPN Type Protocol Port Source Description MySQL TCP ALL rds-server-sg RDS Cluster내 통신 MySQL TCP 3306 rds-client-sg RDS Client SG Security Group Name: rds-server-sg MySQL TCP 3306 VPN IP range Office building Amazon RDS (Primary) Amazon RDS (Replica) Security group (rds-server-sg) + VPC 외부의 IP에 대한 접근 허용을 위해서 RDS 보안 그룹의 Inbound Rule를 수정해야함

Slide 44

Slide 44 text

© 2022, Amazon Web Services, Inc. or its affiliates. Security Group의 Inbound Rule 설정 사례 (최종 개선안) Amazon RDS (Primary) Amazon RDS (Replica) Security group (rds-server-sg) Office building VPN Security group2 (rds-client-sg) Proxy Security group1 (proxy-sg) Protocol Port Source TCP ALL rds-server-sg TCP 3306 rds-client-sg Protocol Port Source Protocol Port Source TCP 3306 VPN IP range TCP 3306 Home IP proxy-sg rds-client-sg rds-server-sg + 1 2 3 1 3 2

Slide 45

Slide 45 text

© 2022, Amazon Web Services, Inc. or its affiliates. Q) AWS 계정에서 보안 그룹이 변경 사항을 어떻게 확인할 수 있을까? Amazon RDS (Primary) Amazon RDS (Replica) Security group Office building VPN Security group2 Proxy Security group1 새로운 Source IP에 대해서 proxy 보안 그룹의 Inbound Rule이 변경될 수 있다. 새로운 Source IP에 추가 되더라 도 RDS 보안 그룹의 Inbound Rule은 변경되지 않는다.

Slide 46

Slide 46 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. CloudTrail

Slide 47

Slide 47 text

© 2022, Amazon Web Services, Inc. or its affiliates. SecOps 사례 • AWS 계정에서 보안 그룹 또는 리소스가 변경되었는지 확인하려면 어떻게 해야 합니까? • 특정 IAM 사용자, 역할과 AWS 액세스 키의 계정 활동을 모니터링하려면 어떻게 해야 하나요? • EventBridge 및 Amazon SNS를 사용하여 EC2 Linux 인스턴스에 설정된 보안 그룹 변경 사항을 모니터링하려면 어떻게 해야 합니까?

Slide 48

Slide 48 text

© 2022, Amazon Web Services, Inc. or its affiliates. CloudTrail provides audit logs for AWS An audit log of an AWS account’s authenticated request to perform an action with an AWS service and its resources

Slide 49

Slide 49 text

© 2022, Amazon Web Services, Inc. or its affiliates. How CloudTrail works for SecOps • CloudTrail captures actions made directly by the user or on behalf of the user by an AWS service • CloudTrail events are available to the AWS account within 15 minutes: • CloudTrail event history in AWS Management Console for 90 calendar days • CloudTrail trails as log data (if enabled and configured by customer) • Amazon EventBridge as events that can be filtered as a trigger for further action (if configured by customer) • Ingested independently by AWS security services if enabled (for example: Amazon GuardDuty, Amazon Detective) Amazon GuardDuty Amazon Detective

Slide 50

Slide 50 text

© 2022, Amazon Web Services, Inc. or its affiliates. What When How Result accountId eventSource eventName requestParameters eventTime awsRegion eventType userIdentity.type userIdentity.accessKeyId userIdentity.invokedBy eventID errorCode responseElements sharedEventID Critical CloudTrail event fields userIdentity.arn sourceIPAddress userAgent Who https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html

Slide 51

Slide 51 text

Who Result What When How How 허용 TCP 998번 포트에서 들어오는 패킷에 대해서 192.168.0.0/32 대역의 패킷에 대해서 예: 보안 그룹의 Inbound 규칙에서 192.168.0.0/32, TCP 포트 998을 허용 1 3 2 4 5 4

Slide 52

Slide 52 text

© 2022, Amazon Web Services, Inc. or its affiliates. CloudTrail 이벤트 조회 및 분석 AWS Management Console CloudTrail Lake Amazon Athena Amazon CloudTrail 1 2

Slide 53

Slide 53 text

© 2022, Amazon Web Services, Inc. or its affiliates. SecOps 사례 • AWS 계정에서 보안 그룹 또는 리소스가 변경되었는지 확인하려면 어떻게 해야 합니까? https://aws.amazon.com/ko/premiumsupport/knowledge-center/cloudtrail-event-history- changed/ • 특정 IAM 사용자, 역할과 AWS 액세스 키의 계정 활동을 모니터링하려면 어떻게 해야 하나요? https://aws.amazon.com/ko/premiumsupport/knowledge-center/view-iam-history/ • EventBridge 및 Amazon SNS를 사용하여 EC2 Linux 인스턴스에 설정된 보안 그룹 변경 사항을 모니터링하려면 어떻게 해야 합니까? https://aws.amazon.com/ko/premiumsupport/knowledge-center/monitor-security-group- changes-ec2/

Slide 54

Slide 54 text

© 2022, Amazon Web Services, Inc. or its affiliates. AuthorizeSecurityGroupIngress AuthorizeSecurityGroupEgress RevokeSecurityGroupIngress RevokeSecurityGroupEgress [SecOps] EC2 인스턴스의 보안 그룹 변경 사항 모니터링 AWS CloudTrail Amazon EventBridge Amazon SNS Admin User 보안 그룹 API 호출 Security group1 Amazon EC2 Security group2 Amazon EC2 https://aws.amazon.com/ko/premiumsupport/knowledge-center/monitor-security-group-changes-ec2/

Slide 55

Slide 55 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. S3

Slide 56

Slide 56 text

© 2022, Amazon Web Services, Inc. or its affiliates. S3 비용을 증가 시키는 작은 실수들 • Get/Put/List 등 요청 비용이 모두 같다고 착각함 • 작은 크기의 파일들을 아주 많이 저장함 • S3에 접근할 때, VPC Endpoint 사용하지 않음

Slide 57

Slide 57 text

© 2022, Amazon Web Services, Inc. or its affiliates. S3 Get/Put/List Pricing • Get/Put/List 등 요청 비용은 모두 다르다 https://aws.amazon.com/ko/s3/pricing/ 약 10배 차이

Slide 58

Slide 58 text

© 2022, Amazon Web Services, Inc. or its affiliates. ü Storage Overhead 요금 ü 이전 요청 요금 S3 비용을 증가 시키는 작은 실수들 • 작은 크기의 파일들을 아주 많이 저장함

Slide 59

Slide 59 text

© 2022, Amazon Web Services, Inc. or its affiliates. Cost-Conscious Design Data Source Amazon Kinesis Data Streams Amazon Kinesis Data Firehose Amazon S3 Amazon Athena Amazon QuickSight Buffering Limits: 1~15min 또는 1~128MiB Amazon S3 s3://bucket/csv/year=?/month=?/day=?/hour=?/ 1.csv, 10MiB 2.csv, 9.5MiB … 100.csv, 11MiB many small files s3://bucket/parquet/year=?/month=?/day=?/hour=?/ 1.parquet, 100MiB 2. parquet, 90.5MiB … 5.parquet, 110MiB a few of large files AWS Lambda Event (time-based) 일정 주기로 CTAS 쿼리를 수행해서 작은 파일들을 큰 파일로 압축해서 저장함 [CTAS 쿼리] CREATE TABLE new_table WITH ( external_location='{location}', format = 'PARQUET', parquet_compression ='SNAPPY') AS SELECT * FROM old_table WHERE year={year} AND month={month} AND day={day} AND hour={hour} WITH DATA

Slide 60

Slide 60 text

© 2022, Amazon Web Services, Inc. or its affiliates. S3 접근 비용 (Internet Gateway vs. NAT) V P C 바 깥 의 A W S 서 비 스 와 의 통 신 할 때 , 데 이 터 전 송 비 용 ü NAT Gateway 대신 Gateway VPC Endpoint를 통해 AWS S3에 접근할 것 ü Gateway VPC Endpoint를 사용할 때는 데이터 처리 요금이나 시간당 요금이 부과되지 않음 S3에 접근할 때, VPC Endpoint를 사용하면 데이터 전송 비용을 절감할 수 있음

Slide 61

Slide 61 text

Private subnet VPC 바깥의 AWS 서비스와의 통신 P R I V A T E S U B N E T 에 서 는 N A T 게 이 트 웨 이 를 통 해 퍼 블 릭 인 터 넷 으 로 접 근 VPC Amazon S3 가용 영역 가용 영역 Public subnet Public subnet Private subnet Internet Gateway NAT gateway

Slide 62

Slide 62 text

게이트웨이 VPC 엔드포인트 R O U T E 테 이 블 에 V P C 엔 드 포 인 트 추 가 Amazon S3 Gateway VPC Endpoint Private subnet VPC Amazon S3 가용 영역 가용 영역 Public subnet Public subnet Private subnet Internet Gateway

Slide 63

Slide 63 text

게이트웨이 VPC 엔드포인트 인 터 넷 게 이 트 웨 이 나 N A T 게 이 트 웨 이 를 통 하 지 않 고 도 접 근 가 능 Amazon S3 Private subnet VPC Amazon S3 가용 영역 가용 영역 Public subnet Public subnet Private subnet Internet Gateway Gateway VPC Endpoint

Slide 64

Slide 64 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. ChatOps for Slack & Chime

Slide 65

Slide 65 text

© 2022, Amazon Web Services, Inc. or its affiliates. Slack으로 장애 알람 보내기 Amazon EC2 Amazon CloudWatch Alarm Amazon SNS AWS Lambda AWS Chatbot • Web Hook URL 관리 • AWS Lambda 함수 코드 작성 • … more

Slide 66

Slide 66 text

© 2022, Amazon Web Services, Inc. or its affiliates. AWS Chatbot • Receive notifications from AWS services about infrastructure events, billing, security, and more • Run commands for diagnostic information • Pre-defined IAM policy templates for common use cases simplify configuration and enable best practices • Support for Slack and Chime Events Interactive agent for ChatOps AWS Chatbot

Slide 67

Slide 67 text

© 2022, Amazon Web Services, Inc. or its affiliates. 7 AWSome ways to use AWS Chatbot https://aws.amazon.com/ko/blogs/mt/7-awsome-ways-to-use-aws-chatbot/

Slide 68

Slide 68 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. AWS Documents

Slide 69

Slide 69 text

© 2022, Amazon Web Services, Inc. or its affiliates. 개발자들의 업무 시간 Write Read ü Source, Test code 작성 및 수정 ü Debugging ü API, SDK Reference 작성 ü 아키텍처 그림 ü … more ü Source, Test code ü API, SDK References ü Tutorials ü 기타 기술 문서 ü … more

Slide 70

Slide 70 text

© 2022, Amazon Web Services, Inc. or its affiliates. AWS 문서 읽기 전략 AWS 서비스 이해 AWS 서비스 학습 AWS 서비스 활용 AWS 서비스 운영 FAQs - 기본 개념 - 사용 용도 - 제약 사항 - 요금 Developer Guides - 동작 원리 - 실습 예제 - Service Quotas 확인 AWS Blogs - 사례 연구 AWS Solutions - 참조 모델 검색 Developer Guides - IAM 권한 및 정책 설정 - 환경 설정 - 지원되지 않는 기능들 Knowledges Center / re:Post - 알려진 문제에 대한 해결책 검색 AWS 서비스 개선 AWS Blogs - 새로운 사례 발견 - 신규 서비스 출시 및 기능 개선 AWS Well-Architected Lens - 아키텍처 리뷰 Biz. Problem Launch Project

Slide 71

Slide 71 text

© 2022, Amazon Web Services, Inc. or its affiliates. 기술 역량 수준별 AWS 문서 읽기 Beginners • FAQs • Getting Started • Developer Guides ├ Getting Started ├ How it works └ Tutorials • Service quotas • AWS Pricing Builders • Developer Guides • AWS Blogs ├ Architecture ├ AWS News ├ Big Data ├ Containers ├ Database ├ Integration & Automation ├ Machine Learning └ … more • AWS Samples Github Heroes • AWS Solutions • AWS Architecture Center • AWS Well-Architected Lens • AWS Samples Github Troubleshooting • AWS Knowledge Center • AWS re:Post • Developer Guides

Slide 72

Slide 72 text

© 2022, Amazon Web Services, Inc. or its affiliates. 고객들이 자주 묻는 질문들 • Q1) 서비스 요금은 얼마인가요? AWS Pricing 참고 • Q2) 최대 얼마까지 쓸 수 있나요? 서비스 할당량은 어떻게 증가 시킬 수 있나요? Service Quotas 참고 • Q3) Best Practices는 무엇인가요? AWS Blogs, AWS Solutions, AWS Well-Architecture Center, Developer Guides의 Best Practices 섹션 참고 • Q4) Reference Architecture가 무엇인가요? AWS Well-Architecture Center에서 조회 • Q5) 다른 고객들은 어떻게 사용하나요? AWS Blogs에서 검색

Slide 73

Slide 73 text

© 2022, Amazon Web Services, Inc. or its affiliates. AWS Service Quotas https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html Bookmark

Slide 74

Slide 74 text

re:Post • Community Q&A site • Answers from AWS and customers • Expert reviewed • Free! https://repost.aws/ Bookmark

Slide 75

Slide 75 text

© 2022, Amazon Web Services, Inc. or its affiliates. AWS Documentation https://docs.aws.amazon.com/index.html Bookmark

Slide 76

Slide 76 text

© 2022, Amazon Web Services, Inc. or its affiliates. Bonus! Startup을 위한 AWS 기술 세션 동영상 고객 사례 1 핵심 서비스 소개 2 Short Demos 3

Slide 77

Slide 77 text

© 2022, Amazon Web Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Summary

Slide 78

Slide 78 text

© 2022, Amazon Web Services, Inc. or its affiliates. Key Points • Item #1: IAM – Root User는 절대 사용하지 말자! • Item #2: VPC – 네트워크의 기본 개념을 이해하자! • Item #3: Security Group – Client와 Server용으로 보안 그룹을 분리해서 사용하자! • Item #4: CloudTrail – 반드시 CloudTrail을 활성화 하자! • Item #5: S3 – 매우 저렴하지만, 사소한 실수 때문에 비용이 증가할 수 있다! • Item #6: ChatOps for Slack and Chime – Amazon Lambda 대신 ChatBot을 사용하자! • Item #7: AWS Documents – 문서 읽기를 습관화 하자!

Slide 79

Slide 79 text

© 2022, Amazon Web Services, Inc. or its affiliates. Resources • Ten Mistakes Founders Make on AWS, and How to Avoid Them § https://aws.amazon.com/ko/blogs/startups/ten-mistakes-founders-make-on-aws-and-how-to-avoid-them/ • Security best practices in IAM § https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html • AWS CloudTrail Lake – a managed audit and security Lake § https://aws.amazon.com/ko/blogs/mt/announcing-aws-cloudtrail-lake-a-managed-audit-and-security-lake/ • Overview of Data Transfer Costs for Common Architectures § https://aws.amazon.com/ko/blogs/architecture/overview-of-data-transfer-costs-for-common-architectures/ • How can I reduce data transfer charges for my NAT gateway? § https://aws.amazon.com/ko/premiumsupport/knowledge-center/vpc-reduce-nat-gateway-transfer-costs/

Slide 80

Slide 80 text

© 2022, Amazon Web Services, Inc. or its affiliates. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates.