saaStudy

#1 ๋ณด์•ˆ ์ž๊ฒฉ ์ฆ๋ช…

  • Access Key๋Š” ๋ฃจํŠธ ๊ณ„์ •์— ๋งŒ๋“ค๋ฉด cli๋‚˜ sdk๋กœ ๋ฃจํŠธ ๊ถŒํ•œ์— ์ ‘๊ทผ ํ•˜๋Š”๊ฒƒ์ด๋ฏ€๋กœ ๋งŒ๋“ค์ง€ ์•Š๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.

#2 IAM Roles

  • IAM Roles are like an user but they are intended to be used not by physical people,

  • but instead they will be by AWS services.

#3 ๋ณด์•ˆ ๊ด€๋ฆฌ

  • Credential report : csv๋กœ ์œ ์ €๋ณ„ access ํžˆ์Šคํ† ๋ฆฌ ์ œ๊ณต

  • Access Advisor : ๊ถŒํ•œ ์ค‘์—์„œ last accessed๋กœ ์–ด๋–ค ์„œ๋น„์Šค๊ฐ€ ํ•„์š”์—†๋Š” ์ง€ ์•Œ ์ˆ˜ ์žˆ์Œ

#4 IAM Policies

  • JSON documents that define a set of permissions for making requests to AWS services, and can be used by IAM Users, User Groups, and IAM Roles

#5 IAM User Groups can contain IAM Users and other User Groups. << False

  • IAM User Groups can contain only IAM Users. << True

#6 EC2 INSTANCE TYPE(33๊ฐ•)

  • general : t class

  • compute optimized(high performance) : c class

  • memory optimized : r class

  • storage optimized : I, D, H class

#7 ๋ณด์•ˆ ๊ทธ๋ฃน

  • ํ•œ ๋ณด์•ˆ ๊ทธ๋ฃน์ด ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ธ์Šคํ„ด์Šค์— ๋ถ€์ฐฉ ๊ฐ€๋Šฅ

  • ํ•œ ์ธ์Šคํ„ด์Šค๊ฐ€ ์—ฌ๋Ÿฌ ๋ณด์•ˆ ๊ทธ๋ฃน์„ ๊ฐ€์งˆ ์ˆ˜๋„ ์žˆ๋‹ค.

  • it's good to maintain one separate security group for ssh access

#8 classic port

  • 22 : ssh

  • 21 : ftp

  • 22 : sftp(ssh๋ฅผ ์‚ฌ์šฉํ•œ ftp)

  • 80 : http

  • 443 : https

  • 3389 : rdp(remote desktop protocol) - log into a windows instance

#9 ๋ณด์•ˆ๊ทธ๋ฃน์„ ์ธ๋ฐ”์šด๋“œ๋ฃฐ์— ์ถ”๊ฐ€ํ•˜๋ฉด ๋ณด์•ˆ๊ทธ๋ฃน์ด ๋ถ€์ฐฉ๋œ ์ธ์Šคํ„ด์Šค๊ฐ€ ํ—ˆ์šฉ๋œ๋‹ค. ๋”ฐ๋ผ์„œ ip๋‚˜ port๋ฅผ ๋ชฐ๋ผ๋„ ์ธ๋ฐ”์šด๋“œ๊ฐ€ ํ—ˆ์šฉ๋  ์ˆ˜ ์žˆ๋‹ค.

#10 chmod 0400 << ssh ๋กœ๊ทธ์ธ pemํ‚ค ์ฝ๊ธฐ ์ „์šฉ์œผ๋กœ ๊ถŒํ•œ ๋ณ€๊ฒฝ ๋งฅ์—์„œ ์ด๊ฑธ ํ•ด์•ผ ssh -i๋กœ ๋กœ๊ทธ์ธ ๊ฐ€๋Šฅ

#11 never do aws configure at ec2 instance

  • ์™œ๋ƒํ•˜๋ฉด aws configure๋กœ ec2์— iam์˜ ๊ถŒํ•œ์„ ์ค˜๋ฒ„๋ฆฌ๋ฉด ec2์— ์ ‘๊ทผํ•˜๋Š” ๋‹ค๋ฅธ ๊ถŒํ•œ์„ ๊ฐ€์ง„ iam๋„ ๊ทธ ๊ถŒํ•œ์„ ํš๋“ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

#12

  • instance ssh ์ ‘๊ทผ : pem key

  • aws cli ์„ค์ • : access key id, secret access key

#13 aws ec2 purchasing option

#14 ec2 spot instances requests

  • spot instance used for batch jobs, data analysis, or workloads that are resilieent to failures

  • resilient to failures means that '์‹คํŒจํ•ด๋„ ๊ดœ์ฐฎ์€ ๊ฒƒ' ์ •๋„?

#15 how to terminate spot instances

  • 44๊ฐ• ์ฐธ๊ณ 

#16 Spot Fleets

  • set of spot instances(optionaaly on-demand instance can be here)

  • spot fleets allow us to automatically request spot instances with the lowest price

#17 machines connect to www using NAT + internet gateway(proxy)

#18 placement groups : ์ธ์Šคํ„ด์Šค๋“ค์— ๋Œ€ํ•ด ๋ฌผ๋ฆฌ์ ์œผ๋กœ ๊ทธ๋ฃนํ•‘ํ•˜๋Š” ๊ฒƒ

  • cluster

  • spread

  • partition >> hadoop, kafka์— ์‚ฌ์šฉ

  • ๋Œ€์ƒ ๊ทธ๋ฃน์„ ๋งŒ๋“ค๊ณ  ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ ์‹œ ์ ์šฉ๊ฐ€๋Šฅํ•˜๋‹ค.

#19 elastic network interfaces

  • logical component in VPC

  • it represents a virtual network card

  • it gives ec2 instances access to the network

  • also used out of ec2 instance(์ธ์Šคํ„ด์Šค ๋ฐ–์—์„œ๋„ ์‚ฌ์šฉ๊ฐ€๋Šฅ, but ๋‚˜์ค‘์— ๋‹ค๋ฃธ)

  • ์†์„ฑ

    • ํ•œ ec2๊ฐ€ primary private ipv4, one or more secondary ipv4๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Œ

    • each eni can have one elastic ip per private ipv4 or public ipv4

    • one or more security groups ํ• ๋‹น๊ฐ€๋Šฅ

    • a MAC address is attached

    • failover๋ฅผ ์œ„ํ•ด eni๋ฅผ ๋‹ค๋ฅธ ec2์— ๋ถ€์ฐฉ๊ฐ€๋Šฅ ์ฆ‰ eni๋Š” ์ด๋™๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๊ฒƒ

    • bound to a specific availability zone(AZ)

#20 elastic network interface ์„ค์ •

  • description

  • subnet >> ์„œ์šธ availability zone์—์„œ a,b,c,d ์„ ํƒ

  • ipv4ํ• ๋‹น auto assign

  • security group ์„ค์ •

#21 EC2 Nitro

  • it is next generation EC2 instance

  • new virtualization technology

  • higher speed EBS (MAX 64000 IOPS, whereas 32000 IOPS on none nitro / IOPS : io operation per second)

  • better security

  • Virtualized์™€ Bare metal ๋ชจ๋‘ ์ง€์›

#22 optimizing cpu option

  • core๋‚˜ ์Šค๋ ˆ๋“œ(vCPU)๋ฅผ billing ๋•Œ๋ฌธ์— ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค.

#23 spot block instance

  • ์˜ˆ๋ฅผ ๋“ค๋ฉด batch ์ž‘์—…์ค‘ 1~6์‹œ๊ฐ„ ์ •๋„๋˜๋Š” ์‹œ๊ฐ„์—๋Š” interrupt๋ฅผ ๋ง‰์„ ์ˆ˜ ์žˆ์Œ

#24 EBS Volumes

  • they can only be mounted to one instance at a time

  • bound to a specific availability zone

  • network drive์ด๊ธฐ ๋–„๋ฌธ์— io์— use networkํ•œ๋‹ค. ๋”ฐ๋ผ์„œ a bit of latency๊ฐ€ ์ƒ๊ธด๋‹ค.

  • snapshot์€ az์— ์ƒ๊ด€์—†์ด ์˜ฎ๊ธธ ์ˆ˜ ์žˆ์Œ

  • can increase capacity of drive over time

#25 AMI

  • creating an AMI will also create EBS snapshots

  • like ebs, ami is built for a specific region and also can be copied across region

#26 EC2 hibernate

  • EC2 instance root volume type must be an ebs volume

#27 EC2 Instance Store

  • ๋ฌผ๋ฆฌ์ ์œผ๋กœ ec2์™€ ๋ถ™์–ด์žˆ๊ธฐ ๋•Œ๋ฌธ์— high io performance ๊ธฐ๋Œ€ ๊ฐ€๋Šฅ

  • ํ•˜์ง€๋งŒ instance๋ฅผ stopํ•˜๊ธฐ๋งŒ ํ•ด๋„ ๋ณผ๋ฅจ์ด ๋‹ค ์‚ญ์ œ๋จ

  • ์บ์‹œ, ๋ฒ„ํผ, ์ผ์‹œ์  ๋ฐ์ดํ„ฐ ์ €์žฅ์— ์‚ฌ์šฉ

  • It is ephemeral drive

  • 256,000 IOPS ์ด์ƒ ๊ธฐ๋Œ€๊ฐ€๋Šฅ

  • ๋ฌผ๋ก  ๋ฐฑ์—…์€ ๋ฐ๋ธŒ์˜ต์Šค์—๊ฒŒ ๋‹ฌ๋ ค ์žˆ์Œ

#28 EBS Volume Type

  • gp2,3 : ssd / gp2 >> max 16,000 IOPS

  • io1,2 : ์„ฑ๋Šฅ ๋”์ข‹์€ ssd, great for databases workloads /

    • io1 >> max 64,000 IOPS

    • io2 block express drive >> max 256,000 IOPS

    • 32000์ด์ƒ์˜ iops๋ฅผ ์›ํ•œ๋‹ค๋ฉด nitro ec2์˜ io volume์„ ์‚ฌ์šฉํ•  ๊ฒƒ

    • io1,2์˜ ๊ฒฝ์šฐ์—๋Š” multi-attach๊ฐ€ ๊ฐ€๋Šฅํ•ด์„œ ์—ฌ๋Ÿฌ ์ธ์Šคํ„ด์Šค๊ฐ€ ํ•œ ๋ณผ๋ฅจ์„ ์‚ฌ์šฉํ•˜๊ฒŒ ํ•  ์ˆ˜๋„ ์žˆ์Œ

    • Using EBS Multi-Attach, you can attach the same EBS volume to multiple EC2 instances in the same AZ.

    • Each EC2 instance has full read/write permissions.

    • ์ฆ‰ EBS์˜ ์†์„ฑ์€ same az์ด์–ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์ด ์ ์šฉ๋œ๋‹ค.

    • ๊ทธ๋Ÿด ๊ฒฝ์šฐ ๋™์‹œ write๋ฅผ manageํ•ด์•ผํ•จ

    • ๊ทธ๋Ÿด ๊ฒฝ์šฐ achieve high application availability

    • ๊ทธ๋Ÿด ๊ฒฝ์šฐ cluster awareํ•œ file system์„ ์จ์•ผ ํ•จ(XFS, EX4๋Š” ์•ˆ๋จ)

  • st1, sc1 : hdd, cannot be a boot volume

#29 EBS Encryption

  • EBS Encryption์„ enableํ•˜๋ฉด ๋ชจ๋“  ๋ถ€๋ถ„์—์„œ ์•”ํ˜ธํ™”๊ฐ€ ์ ์šฉ๋จ ๋ชจ๋“  ๋ฐ์ดํ„ฐ, ๋ณผ๋ฅจ, ์Šค๋ƒ…์ƒท, ๋ฐ์ดํ„ฐ ์ „์†ก ์‹œ์—๋„ ์•”ํ˜ธํ™”๊ฐ€ ์ ์šฉ๋จ

  • volume์„ unencrypted๋กœ ์ƒ์„ฑ, ๋˜ ์ด volume์— ๋Œ€ํ•œ snapshot์„ unencrypted๋กœ ์ƒ์„ฑํ•˜๋ฉด

  • snapshot copy๋ณธ์„ encryptedํ•˜๊ฒŒ ๋งŒ๋“ค๊ณ  ์ด encrypted๋œ snapshot์œผ๋กœ๋ถ€ํ„ฐ ์•”ํ˜ธํ™”๋œ volume์„ ์ƒ์„ฑ๊ฐ€๋Šฅ

  • ๋˜๋Š” unencrypted snapshot์—์„œ ๋ฐ”๋กœ encrypted๋œ ๋ณผ๋ฅจ์„ ์ƒ์„ฑ ๊ฐ€๋Šฅ

#30 EFS(Elastic File System)

  • Managed NFS(network file system) that can be mounted on many EC2

  • highly available, expensive, pay per use ๋ฐ˜๋Œ€๋กœ EBS๋Š” PROVISIONED๋œ ๋งŒํผ ์ง€๋ถˆ

  • EFS works with EC2 instance in multi AZ ๋ฐ˜๋Œ€๋กœ EBS๋Š” bound to specific region

  • EFS์— ๋Œ€ํ•ด ๋ณด์•ˆ ๊ทธ๋ฃน ์„ค์ •์ด ํ•„์š”ํ•จ

  • Attributes

    • uses security group to control access to EFS

    • Use cases : content management, web serving, data sharing, Wordpress

    • Only compatible with Linux based AMI not windows (POSIX ํŒŒ์ผ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ)

    • scales automatically

  • Performance & Storage Classes

    • Performance mode

    • Throughput mode

    • Storage Tiers

    • 66๊ฐ• ํ•„๋…

  • EFS-IA(Infrequent Access)์—๋Š” ๊ธฐ๋ณธ ์˜ต์…˜์œผ๋กœ 30์ผ ๋™์•ˆ ์ ‘๊ทผ๋˜์ง€ ์•Š์€ ํŒŒ์ผ์€ IA์˜์—ญ์œผ๋กœ ์˜ฎ๊ฒจ์ ธ ๊ด€๋ฆฌ๋จ(Storage Tier) to save some costs

  • EBS Multi-attach๋Š” single-az์˜ ์ธ์Šคํ„ด์Šค๋งŒ ์ง€์›ํ•˜์ง€๋งŒ EFS๋Š” multi-az์˜ ์ธ์Šคํ„ด์Šค์™€ ํ†ตํ•ฉ ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Uses security group to control access to EFS

  • Compatible with Linux based AMI(not Windows) : ์œˆ๋„์šฐ ami๋Š” ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค.

#31 AMI

  • AMIs are built for a specific AWS Region, they're unique for each AWS Region.

  • You can't launch an EC2 instance using an AMI in another AWS Region,

  • but you can copy the AMI to the target AWS Region and then use it to create your EC2 instances.

  • ๊ทธ๋Ÿฌ๋‹ˆ๊นŒ us-east-1๋กœ ๋งŒ๋“  AMI๋ฅผ ๋‹ค๋ฅธ ์ง€์—ญ์—์„œ ์‚ฌ์šฉ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ˆ๊นŒ ๋‹ค๋ฅธ ์ง€์—ญ์—์„œ๋„ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋„๋ก AMI๋ฅผ copyํ•œ ํ›„ ์จ์•ผ ํ•œ๋‹ค๋Š” ๋œป

#32 Scalability & High Availability

  • Horizontal Scaling : Auto Scaling Group, Load Balancer

  • High Availability : Auto Scaling Group Multi AZ, Load Balancer Multi AZ

#33 Application Load Balancer(v2)

  • ํด๋ผ์ด์–ธํŠธ์˜ ์š”์ฒญ์€ ๋กœ๋“œ ๋ฐธ๋Ÿฐ์„œ๋ฅผ ํ†ตํ•ด ๋“ค์–ด์˜ค๋ฏ€๋กœ ์ธ์Šคํ„ด์Šค๊ฐ€ ์›๋ณธ ip from์„ ๋ชจ๋ฅด๋ฏ€๋กœ X-Forwarded-For(client ip), X-Forwarded-Port, X-Forwarded-Proto๋ฅผ ์ ์–ด์ฃผ์–ด์•ผ ์š”์ฒญํ•œ ip๋ฅผ ์•Œ ์ˆ˜ ์žˆ๋‹ค.

  • ALB๋Š” multipleํ•œ target group์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์ง€๋งŒ ํ•˜๋‚˜์˜ ํฌํŠธ์—๋Š” ํ•˜๋‚˜์˜ target group๋งŒ ํ• ๋‹นํ•  ์ˆ˜ ์žˆ๋‹ค.

#34 Target Group

  • Instance

  • Ip address(Must be private IPs)

  • Lambda functions

  • Load balancer

#35 Network Load Balancer

  • NLB has one static IP per AZ, and supports assigning Elastic IP : ๋„คํŠธ์›Œํฌ ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ๋Š” az๋‹น ํ•˜๋‚˜์˜ ๊ณ ์ • IP๋ฅผ ๊ฐ–๊ณ  elastic ip ํ• ๋‹น์„ ์ง€์›ํ•œ๋‹ค.

  • Performance is better than ALB

  • ๋กœ๋“œ ๋ฐธ๋Ÿฐ์„œ ์ƒ์„ฑ ์‹œ AZ์— IPํ• ๋‹นํ•  ๋•Œ, ALB๋Š” assigned by AWS์ด์ง€๋งŒ

  • NLB๋Š” ๊ฐ AZ๋‹น elastic ip๋ฅผ ํ• ๋‹นํ•  ์ˆ˜ ์žˆ์Œ

  • NLB๋Š” ALB์™€ ๋‹ฌ๋ฆฌ ๋ณด์•ˆ ๊ทธ๋ฃน์„ ์„ค์ •ํ•˜์ง€ ์•Š๋Š”๋‹ค.

  • ๋”ฐ๋ผ์„œ HTTP๋ฅผ ์ด์šฉํ•ด ๋Œ€์ƒ ๊ทธ๋ฃน ๋‚ด๋ถ€์˜ ์ธ์Šคํ„ด์Šค๋“ค์˜ ์‘๋‹ต์„ ๋ฐ›์œผ๋ ค๋ฉด ์ธ์Šคํ„ด์Šค๋“ค์˜ ๋ณด์•ˆ ๊ทธ๋ฃน์„ HTTP, 80ํฌํŠธ๋ฅผ from anywhere๋กœ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค.

  • ์ฆ‰ NLB๋Š” TCP,TLS,UDP๋ฅผ ์ด์šฉํ•ด ๋ฐ”๋กœ ๋Œ€์ƒ ๊ทธ๋ฃน์— ์ „๋‹ฌํ•˜๋Š” ์—ญํ• ์„ ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

  • ๊ฒ‰์—์„œ ๋ณด๊ธฐ์—๋Š” ๋กœ๋“œ ๋ฐธ๋Ÿฐ์„œ๋ฅผ ํ†ตํ•ด์„œ ์˜ค๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ด์ง€ ์•Š๊ณ , ์™ธ๋ถ€ ํด๋ผ์ด์–ธํŠธ์˜ ์š”์ฒญ์—์„œ ์˜ค๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๋ณด์ธ๋‹ค.

#36 Gateway Load Balancer

  • in IP protocol (layer 3 Network layer)

  • it is transparent network gateway becauase it has single entry and single exit

  • ์š”์ฒญ์ด ๋ณด์•ˆ๊ทธ๋ฃน๊ฐ™์€ ์กฐ๊ฑด์— ๋ถ€ํ•ฉํ•˜์ง€ ์•Š์œผ๋ฉด drop

  • 78๊ฐ• ๋‹ค์ด์–ด๊ทธ๋žจ ์ฐธ๊ณ 

  • it uses GENEVE protocol on port 6081

#37 Cross-Zone Load Balancing

  • Classic Load Balancer

    • disabled by default

    • no charges for inter AZ

  • Application Load Balancer

    • always on

    • no charges for inter AZ

  • Network Load Balancer

    • disabled by default

    • pay charges for inter AZ

#38 SNI(Server Name Indication)

  • CLB ๋ฏธ์ง€์›

  • SNI๋กœ ์ธํ•ด ALB,NLB๋Š” multipleํ•œ ssl์ธ์ฆ์„œ๋ฅผ ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ์— ์žฅ์ฐฉํ•ด ๋‹ค๋ฅธ ๋„๋ฉ”์ธ์˜ ๋Œ€์ƒ๊ทธ๋ฃน์œผ๋กœ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

#39 Connection Draining

  • CLB : Connection Draining

  • ALB & NLB : Deregistration Delay

  • ์ด๊ฑธ ์„ค์ •ํ•˜๋ฉด ์ƒˆ ์š”์ฒญ์€ ๊ฑฐ์ ˆํ•˜๊ณ  ๊ธฐ์กด ์š”์ฒญ์€ ์•ˆ์ „ํ•˜๊ฒŒ ์ฒ˜๋ฆฌํ•œ ํ›„ ์ธ์Šคํ„ด์Šค๋ฅผ ์ข…๋ฃŒํ•  ์ˆ˜ ์žˆ์Œ

#40 Auto Scaling Group

  • work with Load Balancer

  • Automatic Scaling

    • dynamic scaling policy

      • target tracking policy : cpu์— ์‚ฌ์šฉ๋Ÿ‰์— ๊ธฐ๋ฐ˜ํ•ด ์ธ์Šคํ„ด์Šค๋ฅผ ๋Š˜๋ฆด๊ฑฐ๋‚˜ ์ค„์ผ ์ˆ˜ ์žˆ์Œ

      • step policy

      • simple policy

    • predicted scaling policy

      • ์ด์ „ ์‚ฌ์šฉ ๊ธฐ๋ก์— ๊ธฐ๋ฐ˜ํ•œ ์˜คํ†  ์Šค์ผ€์ผ๋ง, ๋จธ์‹ ๋Ÿฌ๋‹์„ ์ด์šฉ

    • scheduled actions

  • Good Mertics To Scale On

    • CPUUtilization: Average CPU utilization across your instances

    • RequestCountPerTarget: to make sure the number of requests per EC2 instances is stable

    • Average Network In / Out (if youโ€™re application is network bound)

    • Any custom metric (that you push using CloudWatch)

  • After a scaling activity happens, you are in the cooldown period (default 300 seconds)

    • During the cooldown period, the ASG will not launch or terminate additional instances (to allow for metrics to stabilize)

    • Advice: Use a ready-to-use AMI to reduce configuration time in order to be serving request fasters and reduce the cooldown period

    • ์ฆ‰ scaliingํ•  ์‹œ cooldown ๊ธฐ๊ฐ„์ด ์ƒ๊ฒจ ๊ทธ ๊ธฐ๊ฐ„์ค‘ ๋˜ ๋‹ค๋ฅธ scaling action์ด ์ƒ๊ธฐ๋ฉด ๋ฌด์‹œํ•œ๋‹ค๋Š” ์˜๋ฏธ

  • ASG Default Termination Policy

    • ASG tries the balance the number of instances across AZ by default

    • ์ฆ‰ ์ธ์Šคํ„ด์Šค๊ฐ€ ๋งŽ์€ AZ๋ถ€ํ„ฐ ์ธ์Šคํ„ด์Šค๋ฅผ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ด ๊ธฐ๋ณธ ์ •์ฑ…

  • ASG lifecycle hooks

    • auto scaling group์—์„œ ์ธ์Šคํ„ด์Šค๊ฐ€ inService๋‚˜ Terminatedํ•œ ์ƒํƒœ๊ฐ€ ๋˜๊ธฐ ์ „์— Wait, Proceedํ•˜๋Š” ๊ธฐ๊ฐ„์— ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜๊ฑฐ๋‚˜ ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

  • Launch Configuration (legacy) VS Launch Template (newer)

    • Launch Configuration (legacy)

      • Must be re-created every time

    • Launch Template (newer)

      • Can have multiple versions

      • Create parameters subsets (partial configuration for re-use and inheritance)

      • Provision using both On-Demand and Spot instances (or a mix)

      • Can use T2 unlimited burst feature

      • Recommended by AWS going forward

  • ์ฐธ๊ณ ๋กœ RequestCountPerTarget์€ CPUUtilization๊ณผ ๋‹ฌ๋ฆฌ ์ƒ์„ฑ ๊ธฐ๋ณธ ์˜ต์…˜์— ์—†๊ธฐ ๋•Œ๋ฌธ์— ์ด๊ฑธ Scaling์˜ ์ง€ํ‘œ๋กœ ์‚ฌ์šฉํ•˜๋ ค๋ฉด CloudWatch๋ฅผ ์‚ฌ์šฉํ•ด์„œ custom metric์„ ๋งŒ๋“  ํ›„ CloudWatch์•Œ๋žŒ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

  • Use a ready-to-use AMI to reduce configuration time in order to be serving request fasters and reduce the cooldown period : ready-to-use ami๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์„ค์ • ์‹œ๊ฐ„์„ ์ค„์—ฌ cooldown period๋ฅผ ์ค„์ผ ์ˆ˜ ์žˆ๋‹ค.

  • ASG tries the balance the number of instances across AZ by default : AZ๊ฐ„ ์ธ์Šคํ„ด์Šค ์ˆ˜์— ๊ท ํ˜•์„ ๋งž์ถ”๋Š” ๊ฒƒ์ด default์ด๋‹ค.

#41 RDS

  • can't ssh to an instance

  • RDS Backups

    • ์ž๋™ ๋ฐฑ์—… ์กด์žฌ

    • ๋งค์ผ ๋ชจ๋“  ๋ฐ์ดํ„ฐ๊ฐ€ ๋ฐฑ์—…๋จ

    • ๋ฐฑ์—…๋ฐ์ดํ„ฐ๋Š” 7์ผ ๋™์•ˆ ์ €์žฅ๋˜๊ณ  35์ผ๊นŒ์ง€ ์—ฐ์žฅ๊ฐ€๋Šฅ

    • ๋งค 5๋ถ„๋งˆ๋‹ค ํŠธ๋žœ์žญ์…˜ ๋กœ๊ทธ๊ฐ€ ์Œ“์ž„

  • DB Snapshot

    • ์œ ์ €๊ฐ€ ์ง์ ‘ ๋ฐฑ์—…ํ•จ

    • ๋ณด์œ  ๊ธฐ๊ฐ„ ๋ฌด์ œํ•œ

  • Storage Auto Scaling

    • Helps you increase storage on your RDS DB instance dynamically

    • When RDS detects you are running out of free database storage, it scales automatically

    • You have to set Maximum Storage Threshold

    • Useful for applications with unpredictable workloads

  • Read Replicas

    • up to 5 read replicas : ์ตœ๋Œ€ 5๊ฐœ์˜ replica ์ƒ์„ฑ ๊ฐ€๋Šฅ

    • within az, cross az, cross region

    • network cost : async replication to different az but same region no fee

    • network cost : async replication to different region will fee

    • replication is async

  • RDS Multi AZ (Disaster Recovery)

    • SYNC replication

    • One DNS name โ€“ failover to standby(dns๋ฅผ ์‚ฌ์šฉํ•ด์„œ rds์ธ์Šคํ„ด์Šค๊ฐ€ ์‚ฌ์šฉ ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฉด ์ž๋™ ๊ต์ฒดํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉ์ž๋Š” dns๋งŒ ์•Œ๋ฉด ๋จ)

    • Increase availability

    • Not used for scaling

    • Important : The Read Replicas be setup as Multi AZ for Disaster Recovery (DR)

  • From Single-AZ to Multi-AZ

    • Zero downtime operation (no need to stop the DB)

    • Just click on โ€œmodifyโ€ for the database

  • Multi AZ์™€ Read Replica์˜ ํฐ ์ฐจ์ด์ ์€ sync์™€ async๋ผ๋Š” ํŠน์ง•

  • Multi-AZ replication is free

  • Encryption has to be defined at launch time

  • IAM-based authentication can be used to login into RDS MySQL & PostgreSQL

  • RDS - IAM Authentication์œผ๋กœ ์–ป์„ ์ˆ˜ ์žˆ๋Š” ์žฅ์ 

    • ์ฐธ๊ณ  : aws rds generate-db-auth-token << ์ด๋Ÿฐ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•จ

    • Network in/out must be encrypted using SSL

    • IAM to centrally manage users instead of DB : rds ์„œ๋น„์Šค๋กœ๋ถ€ํ„ฐ ํ† ํฐ ๋ฐœ๊ธ‰์„ ํ†ตํ•ด IAM policy์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ rds์ ‘๊ทผ ๊ถŒํ•œ์„ ๊ฐ€์ง€๋ฏ€๋กœ db์ ‘๊ทผ ๊ถŒํ•œ์„ db๊ฐ€ ์•„๋‹Œ IAM์ด ๊ด€๋ฆฌํ•ด ๊ด€๋ฆฌ๋ฅผ ์ค‘์•™ํ™”ํ•  ์ˆ˜ ์žˆ๋‹ค.

    • Can leverage IAM Roles and EC2 Instance profiles for easy integration

#42 RDS Security

  • ๋งˆ์Šคํ„ฐ๊ฐ€ ์•”ํ˜ธํ™”๋˜์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด, ๋ ˆํ”Œ๋ฆฌ์นด๋Š” ์•”ํ˜ธํ™”ํ•  ์ˆ˜ ์—†๋‹ค.

  • rds์—์„œ์˜ enforce ssl

    • postgre : parameter group ์‚ฌ์šฉ

    • mysql : sql command ์‚ฌ์šฉ(grant user ... require ssl)

  • 91๊ฐ• summary ์ฝ์–ด๋ณด๊ธฐ

#43 Aurora

  • aurora ๊ตฌ์กฐ 92๊ฐ•

  • aurora hands on 93๊ฐ• : replica์‚ฌ์šฉ ์•ˆํ•ด๋„ storage๋Š” replica๋Š” 3๊ฐœ์˜ az์— ์ €์žฅ๋œ๋‹ค. that's guarantee.

  • aurora์˜ shared storage volume์€ master, read replica๊ฐ€ ๊ณต์œ ํ•˜๊ณ , 10GB to 64TB๊นŒ์ง€ ์ž๋™ ํ™•์žฅ๋œ๋‹ค.

  • One Aurora Instance takes writes(master)

  • Automated failover for master in less than 30 seconds

  • Master + up to 15 Aurora Read Replicas serve reads : ๋งˆ์Šคํ„ฐ 1๊ฐœ + read replica ์ตœ๋Œ€ 15๊ฐœ = ์ด 16๊ฐœ

  • Support for Cross Region Replication

  • 6 copies of your data across 3 AZ : ์•ฝ๊ฐ„์˜ ์ธ์Šคํ„ด์Šค๊ฐ€ failํ•ด๋„ ์ƒ๊ด€์—†๋‹ค๋Š” ๊ฒƒ์„ ๋ณด์—ฌ์คŒ

    • 4 copies out of 6 needed for writes : ์“ฐ๊ธฐ์— 6๊ฐœ ์ค‘ ์ตœ์†Œ 4๊ฐœ์˜ ์นดํ”ผ๋ณธ์ด ํ•„์š”

    • 3 copies out of 6 need for reads : ์ฝ๊ธฐ์— 6๊ฐœ ์ค‘ ์ตœ์†Œ 3๊ฐœ์˜ ์นดํ”ผ๋ณธ์ด ํ•„์š”

  • Aurora Security

    • Possibility to authenticate using IAM token (same method as RDS)

  • Aurora Cross Region Read Replicas

    • Useful for disaster recovery : ์žฌํ•ด ๋ณต๊ตฌ์— ์œ ์šฉํ•˜๋‹ค.

  • Aurora Global Database (recommended) : ์žฌํ•ด ๋ณต๊ตฌ์— Aurora Cross Region Read Replicas๋ณด๋‹ค ๋” ์œ ์šฉํ•˜๋‹ค.

    • 1 Primary Region (read / write)

    • Up to 5 secondary(read-only) regions*, replication lag is less than 1 second

    • Up to 16 Read Replicas per secondary region

    • Helps for decreasing latency : ๋ชจ๋“  ๋ฆฌ์ „์—์„œ ๋น ๋ฅธ ์ ‘๊ทผ ๊ฐ€๋Šฅ

    • Promoting another region (for disaster recovery) has an RTO of < 1 minute

#44 Aurora Replicas - Auto Scaling

#45 Section 9 : quiz 6 - 5๋ฒˆ, 8๋ฒˆ, 11๋ฒˆ

#46 Route 53

  • Multi Value policy์™€ Simple policy์˜ ์ฐจ์ด์ ์€ Multi Value๋Š” health check๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๊ฒƒ

  • ๋ฐ˜๋ฉด simple policy๋Š” ์—ฌ๋Ÿฌ ๊ฐ’๋“ค์„ ๋ฆฌํ„ดํ•˜๊ณ  ํด๋ผ์ด์–ธํŠธ๋Š” ๊ทธ ์ค‘ ๋žœ๋คํ•œ ๊ฐ’์„ ๋ฐ›์•„์„œ ์‚ฌ์šฉํ•œ๋‹ค.

  • Health Check 3๊ฐ€์ง€

    • Monitor on EndPoint

    • Calculated Health Check

    • Cloud Watch Alarm์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” Health Check / Private Endpoint๊ฐ™์€ ๊ณณ์€ health check์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋ฏ€๋กœ cloudwatch metric์„ ์‚ฌ์šฉํ•ด ์—ฐ๋™

#47 S3

  • If uploading more than 5GB, must use โ€œmulti-part uploadโ€ : s3์— ์—…๋กœ๋“œํ•˜๋Š” ์˜ค๋ธŒ์ ํŠธ๊ฐ€ 5GB ์ด์ƒ์ด๋ฉด multi-part upload๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

  • Cloudfront๋Š” 1GB ๋ฏธ๋งŒ์ธ static ์ž์›์„ ์บ์‹œํ•˜๊ธฐ ์ ํ•ฉํ•˜๋‹ค. 1GB ์ด์ƒ์ธ ์ž์›์— ๋Œ€ํ•ด์„œ๋Š” S3 Transfer Acceleration(Cloudfront์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๊ธ€๋กœ๋ฒŒํ•œ ์„œ๋น„์Šค์ด๊ธฐ ๋•Œ๋ฌธ์— ๊ธ€๋กœ๋ฒŒํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ ํ•ฉ)์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.

  • s3 versioning : delete marker๊ฐ€ ์กด์žฌํ•ด์„œ restore๊ฐ€ ๊ฐ€๋Šฅํ•จ

  • 135๊ฐ• s3 CORS ์ด๋ก  ์ฝ์–ด๋ณด๊ธฐ

  • Explicit DENY in an IAM Policy will take precedence over an S3 bucket policy.

  • IAM Policy๊ฐ€ s3 bucket policy์— ์šฐ์„ ํ•˜๊ฒŒ ํ•˜๋ ค๋ฉด explicit deny๋ฅผ iam policy์— ์ ์šฉํ•˜๋ฉด ๋œ๋‹ค.

  • 99.999999999% durability / 99.99% availability : durability๋Š” ์ถ”ํ›„ ์–ธ์  ๊ฐ€๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•˜๊ณ , availabilty๋Š” ์ฆ‰์‹œ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์„ ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•œ๋‹ค.

  • S3 Replication : S3 Replication์€ cross region, same region ๋ชจ๋‘ ๊ฐ€๋Šฅํ•˜๊ณ , async replication์„ ์‚ฌ์šฉํ•œ๋‹ค.

#48 S3 Storage Classes : One Zone IA๋ฅผ ์ œ์™ธํ•œ ๋ชจ๋“  ํด๋ž˜์Šค๋Š” 3๊ฐœ ์ด์ƒ์˜ az๋ฅผ ๊ฐ€์ง„๋‹ค.

  • S3 Standard

  • S3 Intelligent Tiering : S3 Intelligent-Tiering์€ ์•ก์„ธ์Šค ํŒจํ„ด์ด ๋ณ€๊ฒฝ๋  ๋•Œ ๋‘ ์•ก์„ธ์Šค ํ‹ฐ์–ด(Frequent Access ๋ฐ Infrequent Access) ๊ฐ„์— ๋ฐ์ดํ„ฐ๋ฅผ ์ด๋™์‹œ์ผœ ๋น„์šฉ์„ ์ž๋™์œผ๋กœ ์ ˆ์•ฝํ•ด ์ฃผ๋Š” ์ตœ์ดˆ์˜ ํด๋ผ์šฐ๋“œ ๊ฐ์ฒด ์Šคํ† ๋ฆฌ์ง€ ํด๋ž˜์Šค๋กœ์„œ, ์•ก์„ธ์Šค ํŒจํ„ด์„ ์•Œ ์ˆ˜ ์—†๊ฑฐ๋‚˜ ์•ก์„ธ์Šค ํŒจํ„ด์ด ๋ณ€๊ฒฝ๋˜๋Š” ๋ฐ์ดํ„ฐ์— ์ ํ•ฉ

  • S3 Standard IA

  • S3 One Zone IA : 1๊ฐœ์˜ az๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค๋ฅธ ํด๋ž˜์Šค์— ๋น„ํ•ด์„œ ๋‚ฎ์€ availability๋ฅผ ๊ฐ€์ง

  • S3 Glacier : ๋น ๋ฅด๋ฉด ๋ถ„๋‹จ์œ„์—๋„ retrieveํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, standard๋Š” 3 to 5 hours

  • S3 Glacier Deep Archive : bulk์˜ต์…˜ ์„ ํƒ ์‹œ retrieve์— ์ตœ๋Œ€ 48์‹œ๊ฐ„ ๊ฑธ๋ฆผ, standard๋Š” 12 hours

#49 S3 Lifecycle Rules

  • S3 ์‹œ๋‚˜๋ฆฌ์˜ค๋ฅผ ์ฃผ๊ณ  ๋ผ์ดํ”„ ์‚ฌ์ดํด์„ ์–ด๋–ป๊ฒŒ ๊ตฌ์„ฑํ•  ๊ฒƒ์ธ์ง€ ๋ฌผ์–ด๋ณด๋Š” ๋ฌธ์ œ ์ž์ฃผ ์ถœ์ œ p.311

#50 S3 Analytics

  • S3 ๋ถ„์„์„ ์ œ๊ณตํ•ด์„œ ์ด ์˜ต์…˜์„ ํ™œ์„ฑํ™”ํ•˜๋ฉด ๋ถ„์„์— ๊ทผ๊ฑฐํ•ด์„œ ๋ผ์ดํ”„ ์‚ฌ์ดํด์„ ๋ฉฐ์น ์„ ๊ธฐ์ค€์œผ๋กœ ํ•ด์•ผํ•  ์ง€ ๊ฒฐ์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • Standard to Standard_IA๋กœ๋งŒ ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Onezone_IA, Glacier๋Š” ์ œ๊ณตํ•˜์ง€ ์•Š๋Š”๋‹ค.

#51 S3 Baseline Performance

  • Your application can achieve at least 3,500 PUT/COPY/POST/DELETE and 5,500 GET/HEAD requests per second per prefix in a bucket.

  • ์ฆ‰ 4๊ฐœ์˜ prefix๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด 22,000 requests per second for GET and HEAD์˜ ์„ฑ๋Šฅ์„ ๊ฐ€์ง„๋‹ค๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

  • ์˜ˆ์‹œ : object path == prefix:

    • bucket/folder1/sub1/file => /folder1/sub1/

    • bucket/folder1/sub2/file => /folder1/sub2/

    • bucket/1/file => /1/

    • bucket/2/file => /2/

  • ์œ„์—์„œ ๋ณผ ์ˆ˜ ์žˆ๋“ฏ์ด ์œ„ 4๊ฐœ๋Š” ์ „๋ถ€ ๋‹ค๋ฅธ prefix์ด๋‹ค.

#52 S3 Performance

  • p.315, p.317 ๊ทธ๋ฆผ ์ฐธ๊ณ 

  • Multi-Part upload

    • recommended for files > 100MB

    • must use for files > 5GB

    • Can help parallelize uploads (speed up transfers) : ํŒŒ์ผ์„ ์—ฌ๋Ÿฌ ๋ถ€๋ถ„์„ ์ž˜๋ผ ๋‚˜๋ˆˆ ํ›„ ๋™์‹œ์— ๋ณด๋‚ธ๋‹ค.

  • S3 Transfer Acceleration

  • Increase transfer speed by transferring file to an AWS edge location which will forward the data to the S3 bucket in the target region

  • ๊ฐ€๊นŒ์šด region์˜ edge location์— ๋ณด๋‚ด๊ณ  aws๊ฐ€ ์•Œ์•„์„œ private๊ฒฝ๋กœ๋ฅผ ํ†ตํ•ด์„œ ๋ชฉํ‘œ region์˜ bucket์— ๋ณด๋‚ธ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

  • ๋”ฐ๋ผ์„œ ์—…๋กœ๋“œ ์†๋„ ํ–ฅ์ƒ์„ ๊ธฐ๋Œ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • Compatible with multi-part upload

  • edge location์€ cloudfront์—์„œ ๋‹ค์‹œ ๋‹ค๋ฃฐ ๋“ฏํ•˜๋‹ค.

  • S3 Performance โ€“ S3 Byte-Range Fetches

    • Parallelize GETs by requesting specific byte ranges

    • Better resilience in case of failures

    • ํŒŒ์ผ์„ ๋ฐ”์ดํŠธ ๊ธฐ์ค€์œผ๋กœ ๋ถ€๋ถ„์œผ๋กœ ๋‚˜๋ˆ„์–ด ๋ณด๋‚ด๊ฑฐ๋‚˜, ํŒŒ์ผ์—์„œ ์ฒซ ๋ช‡ ๋ฐ”์ดํŠธ๋งŒ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋‹ค.

#53 S3 Select & Glacier Select

  • Retrieve less data using SQL by performing server side filtering

  • ๊ฐ„๋‹จํ•œ ํŒŒ์ผ ํƒ€์ž… ์ •๋„ ex).csv๋ฅผ ์ฟผ๋ฆฌ ๊ฐ€๋Šฅํ•˜๋ฉด ๋ณต์žกํ•œ ์ฟผ๋ฆฌ๋Š” s3 serverless์ธ athena์—์„œ ๋‹ค๋ฃฌ๋‹ค.

#54 S3 Event Notifications

  • ์˜ˆ์‹œ๋กœ ๋™์˜์ƒ์„ s3์— ์—…๋กœ๋“œํ•˜๋ฉด sns, sqs, lambda์— ์•Œ๋ฆผ์„ ์ฃผ๋Š” ์šฉ๋„๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ์ด๋ฒคํŠธ ๋ฐœ์ƒ ์‹œ์ ์€ ์˜ค๋ธŒ์ ํŠธ ์—…๋กœ๋“œ๋‚˜, ์‚ญ์ œ, ๋ณต์ œ ๋“ฑ์œผ๋กœ ์„ค์ •๊ฐ€๋Šฅํ•˜๋‹ค.

  • ์–ธ์ œ notification์ด ๋ฐœ์ƒํ•˜๋Š” ์ง€, rule์„ ์ปค์Šคํ…€ํ•  ์ˆ˜ ์žˆ๋‹ค.

#55 S3 Request Pays

  • s3์— ํŒŒ์ผ์„ ์š”์ฒญํ•˜๋Š” ์‚ฌ๋žŒ์ด ๋„คํŠธ์›Œํฌ ๋น„์šฉ์„ ์ง€๋ถˆํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • aws์— ์ธ์ฆ๋œ ์‚ฌ๋žŒ๋งŒ ๊ฐ€๋Šฅ(must not be anonymous)

#56 Amazon Athena

  • Serverless query service to perform analytics against S3 objects

  • ์œ ํ˜• ๋ฌธ์ œ : analyze data in S3 using serverless SQL, use Athena

  • ์„œ๋ฒ„๋ฆฌ์Šค์ด๊ธฐ ๋•Œ๋ฌธ์— db๋ฅผ ์ง์ ‘ ๋งŒ๋“ค๊ณ  ๊ด€๋ฆฌํ•  ํ•„์š” ์—†์ด, rdb๋ฅผ GUI๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ณ  sql์„ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋‹ค.

  • ์—ฌ๋Ÿฌ ์ •๋ณด๊ฐ€ ์ €์žฅ๋˜๊ธฐ ๋•Œ๋ฌธ์— s3 ์ ‘๊ทผ ์‹œ๊ฐ„, http status๋“ฑ ๋‹ค์–‘ํ•œ ์•ก์„ธ์Šค ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๊ณ  ์กฐํšŒํ•  ์ˆ˜ ์žˆ๋‹ค.

#57 S3 Object Lock

  • WORM (Write Once Read Many) model ๊ตฌํ˜„

  • versioning์ด ํ™œ์„ฑํ™”๋œ ์ƒํƒœ์—์„œ๋งŒ ๋™์ž‘

  • Object retention(๋ณด์œ  ๊ธฐ๊ฐ„)

    • Retention Period: specifies a fixed period > ํŠน์ • ๊ธฐ๊ฐ„ ๋™์•ˆ๋งŒ ๋ณด์œ 

    • Legal Hold: same protection, no expiry date > ์œ„์™€ ๊ฐ™์ง€๋งŒ ๋งŒ๋ฃŒ์ผ์ด ์—†์Œ

  • Mode:

    • Governance mode: ๋ฃจํŠธ ๊ณ„์ •์€ ๋ชจ๋“œ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ, ํŒŒ์ผ ๋ณ€๊ฒฝ ๊ฐ€๋Šฅ

    • Compliance mode: ํ•œ ๋ฒˆ ์„ค์ •ํ•˜๋ฉด ๋ฃจํŠธ ๊ณ„์ •์ด๋ผ๋„ ๋ชจ๋“œ ๋ณ€๊ฒฝ ๋ถˆ๊ฐ€, ํŒŒ์ผ ๋ณ€๊ฒฝ ๋ถˆ๊ฐ€

#58 CloudFront vs S3 Cross Region Replication

  • CloudFront๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•  ๊ณณ

    • Great for static content that must be available everywhere

  • Cross Region Replication์„ ์‚ฌ์šฉํ•ด์•ผ ํ•  ๊ณณ

    • great for dynamic content that needs to be available at low-latency in few regions

    • ๋‹จ์ ์œผ๋กœ๋Š” CloudFront์™€ ๋‹ฌ๋ฆฌ region๋งˆ๋‹ค ์ผ์ผ์ด ์„ธํŒ…ํ•ด์ค˜์•ผ ํ•จ

#59 CloudFront Signed URL / Signed Cookies

  • ๋‹จ์ผ ์ž์›์— ์•ก์„ธ์Šคํ•˜๊ธฐ ์œ„ํ•œ ํŠน์ • ํšŒ์›๋งŒ์„ ์œ„ํ•œ URL

  • Multiple ์ž์›์— ์•ก์„ธ์Šคํ•˜๋Š” ํŠน์ • ํšŒ์›๋งŒ์„ ์œ„ํ•œ URL(one signed cookie for many files)

#60 CloudFront โ€“ Origin Groups

  • high availability๋ฅผ ์œ„ํ•ด origin์„ ์—ฌ๋Ÿฌ ๊ฐœ ๋‘˜ ์ˆ˜ ์žˆ์Œ

#61 CloudFront

  • Origin Access Identity : ์‚ฌ์šฉ์ž๊ฐ€ S3 ๋ฒ„ํ‚ท์—์„œ ์ง์ ‘ ์•ก์„ธ์Šคํ•˜์ง€ ์•Š๊ณ , CloudFront๋ฅผ ํ†ตํ•ด์„œ๋งŒ ํŒŒ์ผ์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    • ๋˜ํ•œ, ๋ณดํ†ต S3 bucket policy์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•œ๋‹ค.

    • CloudFront Geo Restriction : ํ™”์ดํŠธ ๋ฆฌ์ŠคํŠธ, ๋ธ”๋ž™ ๋ฆฌ์ŠคํŠธ๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ๊ตญ๊ฐ€ ์„ ํƒ

  • S3 Cross Region Replication vs CloudFront

    • S3 Cross Region Replication : Great for dynamic content that needs to be available at low-latency in few regions

    • CloudFront : Great for static content that must be available everywhere

  • CloudFront Signed URL vs Signed Cookies

    • Signed URL : access to individual files (one signed URL per file)

    • Signed Cookies : access to multiple files (one signed cookie for many files)

  • CloudFront Origin Groups

    • cloudfront origin group์€ primary origin๊ณผ secondary origin์„ ๋‘์–ด region ๋ ˆ๋ฒจ์˜ ๊ณ ๊ฐ€์šฉ์„ฑ์„ ์‹คํ˜„ํ•˜๊ฒŒ ํ•ด์ค€๋‹ค.

    • S3 + CloudFront : Region-level High Availability

    • Origin Group์˜ ๋Œ€์ƒ์€ ec2๊ฐ€ ๋  ์ˆ˜๋„ s3๊ฐ€ ๋  ์ˆ˜๋„ ์žˆ๋‹ค.

#62 Unicast IP vs Anycast IP

  • AWS Global Accelerator๋Š” Anycast IP๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๊ฐ™์€ ip์ค‘ geo location์ด ๋” ๊ฐ€๊นŒ์šด ์ชฝ์œผ๋กœ ๋ผ์šฐํŒ…๋˜๋Š” ๋ฐฉ์‹์„ ์ฑ„ํƒ

#63 CloudFront vs Global Accelerator

  • Global Accelerator

    • Improves performance for a wide range of applications over TCP or UDP

    • Good fit for non-HTTP use cases

  • CloudFront uses Edge Locations to cache content while Global Accelerator uses Edge Locations to find an optimal pathway to the nearest regional endpoint.

  • CloudFront is designed to handle HTTP protocol meanwhile Global Accelerator is best used for both HTTP and non-HTTP protocols such as TCP and UDP.

#64 AWS Snow Family

  • ๋ช‡์‹ญ ํ…Œ๋ผ๋ฐ”์ดํŠธ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋“ค์„ ๋น ๋ฅด๊ฒŒ ์˜ฎ๊ธฐ๊ณ  ์‹ถ์„ ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ฌผ๋ฆฌ์  ์žฅ์น˜๋ฅผ ์‚ฌ์šฉํ•ด ์†๋„๋ฅผ ๋†’์ธ๋‹ค.

  • ์ฆ‰, ๋„คํŠธ์›Œํฌ๋ฅผ ํ†ตํ•ด s3๊ฐ™์€ ์ €์žฅ์†Œ์— ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ์ง์ ‘ aws์— ํ•˜๋“œ์›จ์–ด์ ์œผ๋กœ ๊ฐˆ์•„๋ผ์šฐ๋Š” ๊ฒƒ์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ํŽธํ•˜๋‹ค.

  • ๋ณดํ†ต ๋ฐ์ดํ„ฐ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์— ์ผ์ฃผ์ผ ์ด์ƒ์ด ๊ฑธ๋ฆด ๋•Œ ์‚ฌ์šฉํ•˜๋ฉด ์ข‹๋‹ค.

  • Snowcone - ์ˆ˜์‹ญ ํ…Œ๋ผ๋ฐ”์ดํŠธ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์— ์‚ฌ์šฉ

  • Snowball Edge - ์ˆ˜์‹ญ ํŽ˜ํƒ€๋ฐ”์ดํŠธ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์— ์‚ฌ์šฉ

  • Snowmobile - ์ˆ˜์‹ญ ์—‘์‚ฌ๋ฐ”์ดํŠธ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์— ์‚ฌ์šฉ

#64 Snow Family Edge Computing

  • ์˜ค์ง€์—์„œ ํด๋ผ์šฐ๋“œ ์ปดํ“จํŒ…์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ snow family๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ณ , snowcone๊ฐ™์€ ๋ฌผ๋ฆฌ์  ์žฅ์น˜์— ์ ‘๊ทผํ•  ๋•Œ AWS OpsHub๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

#64 Snowball into Glacier

  • snowball์—์„œ ๋ฐ”๋กœ glacier๋กœ ์˜ฎ๊ธธ ์ˆ˜ ์—†๊ณ , s3๋กœ ์˜ฎ๊ธด ํ›„ s3 lifecycle์„ ์ด์šฉํ•ด์„œ glacier๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ์ด ์ œ์ผ ์ข‹์€ ๋ฐฉ๋ฒ•์ด๋‹ค.

#65 SQS - Standard Queue

  • FIFO๊ฐ€ ์•„๋‹Œ Standard๋ฒ„์ „์˜ ํŠน์„ฑ

  • At least once delivery : ํ•œ ๋ฒˆ๋งŒ receiveํ•˜๋Š” ๊ฒƒ์„ ๋ณด์žฅํ•œ๋‹ค.

  • Consumers receive and process messages in parallel : ๋ณ‘๋ ฌ์˜ consumer๊ฐ€ ์กด์žฌํ•  ๋•Œ ํ•œ ๋ฉ”์‹œ์ง€๋Š” ํ•œ consumer์—๊ฒŒ๋งŒ ์ „๋‹ฌ๋œ๋‹ค.(ํ•œ ๋ฒˆ๋งŒ ๋ฐ›๋Š” ๊ฒƒ ๋ณด์žฅ)

  • Consumers delete messages after processing them

  • We can scale consumers horizontally to improve throughput of processing

  • FIFO Queue์™€ ๋‹ฌ๋ฆฌ throughput์— ์ œํ•œ์ด ์—†๋‹ค.

  • ๋‚ฎ์€ ์ง€์—ฐ์‹œ๊ฐ„(publish, receivee0ํ•˜๋Š”๋ฐ์— 10ms๋ฐ–์— ๊ฑธ๋ฆฌ์ง€ ์•Š๋Š”๋‹ค.)

  • ๊ฐ ๋ฉ”์‹œ์ง€๋Š” 256KB๋กœ ์ œํ•œ

  • ๋ฉ”์‹œ์ง€๋Š” ๊ธฐ๋ณธ 4์ผ์—์„œ ์ตœ๋Œ€ 14์ผ๊นŒ์ง€ ๋ณด๊ด€๊ฐ€๋Šฅ

#66 SQS - Message Visibility Timeout

  • 387p. consumer๊ทธ๋ฃน ๋‚ด์—์„œ ํ•œ consumer๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ consumeํ•˜๋ฉด ๋‹ค๋ฅธ consumer๋Š” visibility timeout๊ธฐ๊ฐ„ ๋™์•ˆ ๋ฉ”์‹œ์ง€๋ฅผ ๋ณผ ์ˆ˜ ์—†๋‹ค.

  • ์ฆ‰ ํ•œ consumer๊ฐ€ ์†Œ๋น„ํ•˜๋Š” ๋™์•ˆ visibility timeout๊ธฐ๊ฐ„(์‚ฌ์šฉ์ž ์„ค์ •๊ฐ€๋Šฅ)๋™์•ˆ ๋‹ค๋ฅธ consumer์˜ ์ ‘๊ทผ์„ ๋ง‰๋Š” ๊ฒƒ์ด๋‹ค.

  • visibility timeout๊ธฐ๊ฐ„ ์ดํ›„ message๊ฐ€ delete๋˜์ง€ ์•Š์•˜์„ ๋•Œ ๋‹ค์‹œ ๋ฉ”์‹œ์ง€๋ฅผ consumeํ•  consumer๊ฒฐ์ • ๋ฐฉ์‹์€ polling์ค‘์ธ consumer์ค‘ ๋žœ๋ค์œผ๋กœ ๊ฒฐ์ •๋˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

#67 SQS - Dead Letter Queue

  • sqs๋ฅผ ๋‘ ๊ฐœ ๋งŒ๋“ค๊ณ  ํ•˜๋‚˜๋Š” dead letter queue์ „์šฉ ํ๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

  • ์—ฌ๊ธฐ์„œ dead letter์ด๋ผ ํ•จ์€, ํ•œ message์— ๋Œ€ํ•ด์„œ threshold(์‚ฌ์šฉ์ž ์„ค์ • ๊ฐ€๋Šฅ)๋งŒํผ consumer๊ฐ€ receiveํ–ˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ , message๊ฐ€ ์ •์ƒ์ ์œผ๋กœ process๋˜์ง€ ์•Š์€ ๊ฒƒ์„ ๋งํ•˜๊ณ  ์—ฌ๊ธฐ์—์„œ์˜ message๊ฐ€ dead letter์ด๋‹ค.

#68 SQS - Long Polling

  • Long Polling decreases the number of API calls made to SQS while increasing the efficiency and latency of your application.

  • Long Polling์€ ๋ฉ”์‹œ์ง€๊ฐ€ ์ˆ˜์‹ ๋  ๋•Œ๊นŒ์ง€ ๊ธธ๊ฒŒ ๊ธฐ๋‹ค๋ฆฌ๊ฒ ๋‹ค๋Š” ์˜๋ฏธ(๋ณดํ†ต 20์ดˆ๋กœ ์„ค์ •)์ด๋‹ค.

  • ๋ฉ”์‹œ์ง€๊ฐ€ ์—†๋‹ค๋ฉด ๋ช‡ ๋ฒˆ์ด๊ณ  ๊ณ„์† ์š”์ฒญํ•˜๋Š” ์ƒํ™ฉ์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ Long Polling์œผ๋กœ ์ด๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • Increasing the efficiency and latency : ์˜ค๋ž˜ ๊ธฐ๋‹ค๋ฆด ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋‹น์—ฐํ•˜๊ฒŒ๋„ ํšจ์œจ์„ฑ์ด๋‚˜ ์ง€์—ฐ์‹œ๊ฐ„์ด ๋Š˜์–ด๋‚  ์ˆ˜ ์žˆ๋‹ค.

#69 SQS - Request-Response Systems

  • 391p. Request-Response Systems์„ ๊ตฌํ˜„ํ•˜๋Š” ํด๋ผ์ด์–ธํŠธ๊ฐ€ ์กด์žฌํ•œ๋‹ค.

  • SQS Temporary Queue Client๋ผ๋Š” ํด๋ผ์ด์–ธํŠธ(์ž๋ฐ”๋กœ ๊ตฌํ˜„)๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด Request-Response Systems๋ฅผ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๊ณ  ๋‚ด๋ถ€์ ์œผ๋กœ ์ด ์‹œ์Šคํ…œ์„ ๊ตฌํ˜„ํ•˜๋Š” ๊ฐ€์ƒ์˜ ํ๋“ค์ด ๋งŒ๋“ค์–ด์ง„๋‹ค.

#70 SQS - FIFO Queue

  • Standard Queue๊ฐ€ ์ตœ์†Œ ํ•œ ๋ฒˆ ์ด์ƒ์˜ delivery๋ฅผ ๋ณด์žฅํ•˜๋Š” ๊ฒƒ๊ณผ ๋‹ฌ๋ฆฌ, FIFO Queue๋Š” ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ์˜ delivery๋ฅผ ๋ณด์žฅํ•œ๋‹ค.(by removing duplicates)

  • throughput์ด 300msg per second(batching์„ ์‚ฌ์šฉํ•˜๋ฉด 3000msg per second)๋กœ standard์— ๋น„ํ•ด ์ ๋‹ค.

#71 SNS - Simple Notification Service

  • SQS์™€ ๋‹ฌ๋ฆฌ pub/sub๋ชจ๋ธ์„ ์‚ฌ์šฉํ•ด์„œ topic์„ ๋ฐœํ–‰ํ•˜๋ฉด ์—ฌ๋Ÿฌ ๊ตฌ๋…์ž๊ฐ€ ์ฝ๋Š” ๋ฐฉ์‹์ด๋‹ค. topic์€ SNS๊ฐ€ ๋ฐœํ–‰ํ•˜๋Š” ๋ฉ”์‹œ์ง€๋ผ๊ณ  ๋ณด๋ฉด ๋œ๋‹ค.

  • ์ตœ๋Œ€ 100,000๊ฐœ์˜ ํ† ํ”ฝ๊ณผ 10,000,000๊ฐœ์˜ ๊ตฌ๋…์ž๋ฅผ ๊ฐ๋‹นํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ๊ตฌ๋…์ž๋Š” SQS, HTTP/HTTPS๋ฅผ ์‚ฌ์šฉํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜, Lambda ๋“ฑ์ด ๋  ์ˆ˜ ์žˆ๋‹ค.

  • AWS Service์ค‘์—์„œ๋„ SNS๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค๋“ค์ด ๋‹ค์ˆ˜ ์กด์žฌํ•œ๋‹ค.

    • CloudWatch for alarm, Auto Scaling Group Notifications, S3 Bucket Events ๋“ฑ

  • Message Filtering์ด ๊ฐ€๋Šฅํ•ด์„œ ๊ตฌ๋…์ž๋ณ„๋กœ ๋ฐ›๊ณ  ์‹ถ์€ ๋ฉ”์‹œ์ง€๋ฅผ ์„ ๋ณ„ํ•ด์„œ ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค.(ex. ํŠน์ • ๋ฌธ์ž๊ฐ€ ๋“ค์–ด๊ฐ„ ๋ฉ”์‹œ์ง€๋งŒ ๋ฐ›๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ)

#72 SNS + SQS: Fan Out

  • Push once in SNS, receive in all SQS queues that are subscribers : SNS์— ๋ฉ”์‹œ์ง€๋ฅผ ํ‘ธ์‹œํ•˜๋ฉด SQS ๊ตฌ๋…์ž๋“ค์ด ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›๋Š” ํ˜•ํƒœ์ด๋‹ค.

  • ๊ธฐ์กด SQS๋งŒ ์‚ฌ์šฉํ•  ๋•Œ๋Š” ํ•˜๋‚˜์˜ ๋ฉ”์‹œ์ง€๋ฅผ ํ•˜๋‚˜์˜ consumer(SQS)๊ฐ€ ๊ฐ€์ ธ๊ฐ”์ง€๋งŒ, sns๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ ํ•˜๋‚˜์˜ ๋ฉ”์‹œ์ง€๋ฅผ ์—ฌ๋Ÿฌ ๊ตฌ๋…์ž๋“ค์ด ์†Œ๋น„ํ•˜๋Š” ํ˜•ํƒœ๊ฐ€ ๊ฐ€๋Šฅํ•ด์กŒ๋‹ค.

  • ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ S3 Event(ex. object creation)๋ฅผ ์—ฌ๋Ÿฌ SQS์— ๋ณด๋‚ด๊ณ  ์‹ถ๋‹ค๋ฉด fan out ํŒจํ„ด์„ ์‚ฌ์šฉํ•ด, SNS์—์„œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›๊ณ  SNS์—์„œ ์—ฌ๋Ÿฌ ๊ตฌ๋…์ž์—๊ฒŒ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

#73 SNS โ€“ FIFO Topic

  • SNS์—ญ์‹œ SQS์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ Standardํ˜•ํƒœ์™€ FIFOํ˜•ํƒœ๊ฐ€ ์žˆ๊ณ , ๊ฑฐ์˜ ๋น„์Šทํ•œ ํŠน์ง•์„ ์ง€๋‹Œ๋‹ค.

  • ๋‹ค๋งŒ FIFOํ˜•ํƒœ์˜ SNS๋Š” FIFOํ˜•ํƒœ์˜ SQS๋งŒ ๊ตฌ๋…์ž๋กœ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋‹ค. ์™œ๋ƒํ•˜๋ฉด FIFO Queue๋ฐฉ์‹์œผ๋กœ ์ „๋‹ฌ๋˜๋Š” ๋ฉ”์‹œ์ง€๋ฅผ FIFO๋กœ ์ฒ˜๋ฆฌํ•˜๋ ค๋ฉด FIFOํ˜•ํƒœ์˜ SQS๊ฐ€ ์‚ฌ์šฉ๋  ์ˆ˜ ๋ฐ–์— ์—†๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

#74 Kinesis

  • Makes it easy to collect, process, and analyze streaming data in real-time : ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘, ์ฒ˜๋ฆฌ, ๋ถ„์„์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” ์„œ๋น„์Šค

#75 Kinesis Data Streams

  • capture, process, and store data streams : ๋ฐ์ดํ„ฐ ์บก์ณ, ์ฒ˜๋ฆฌ, ์ €์žฅ์„ ์ง€์›ํ•˜๋Š” ์„œ๋น„์Šค

  • Kinesis Data Streams์—๋Š” Record๋ฅผ ๋ฐ›๋Š” shard๊ฐ€ ์กด์žฌํ•˜๊ณ , shard๋“ค์„ ๋ชจ์•„๋†“์€ Stream์ด ์žˆ๋‹ค.

  • Producer๊ฐ€ ๋งŒ๋“œ๋Š” Record๋Š” 1. Partition key, 2. Data Blob์œผ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.(Kinesis Data Streams์— ์ „๋‹ฌ)

  • Kinesis Data Streams๊ฐ€ ๋งŒ๋“œ๋Š” Record๋Š” 1. Partition key, 2. Data Blob 3. Sequence no์œผ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.(Consumers์—๊ฒŒ ์ „๋‹ฌ)

  • Partition key๊ฐ€ ์กด์žฌํ•˜๋Š” ์ด์œ  ์ฐธ๊ณ  : Kafka ์‚ฌ์šฉ์‹œ ์ฃผ์˜์ 

  • throughput์€ 1MB/sec ๋˜๋Š” 1000msg/sec์ด ๊ฐ€๋Šฅํ•˜๊ณ , ์ด throughput์€ per shard์ด๊ธฐ ๋•Œ๋ฌธ์— 30๊ฐœ์˜ shard๋Š” 30MB/sec์˜ throughput์„ ๊ฐ€์ง„๋‹ค.

  • Retention between 1 day (default) to 365 days : ๋ฐ์ดํ„ฐ๊ฐ€ Kinesis Data Streams์— ์ตœ์†Œ 1์ผ ์ด์ƒ ์Œ“์ด๊ธฐ ๋•Œ๋ฌธ์— ์Œ“์ธ ๋ฐ์ดํ„ฐ๋ฅผ ๋Œ€์ƒ์œผ๋กœ replay data๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Data that shares the same partition goes to the same shard (ordering) : Partition key๋ฅผ ์ด์šฉํ•ด ์ˆœ์„œ๋ณด์žฅ์ด ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋Š” ์ˆœ์„œ๋ณด์žฅ ์ง€์›

  • Once data is inserted in Kinesis, it canโ€™t be deleted (immutability) : ๋ฐ์ดํ„ฐ๊ฐ€ ํ•œ ๋ฒˆ ์Œ“์ด๋ฉด retention๊ธฐ๊ฐ„ ๋™์•ˆ ์ง€์šธ ์ˆ˜ ์—†๋‹ค.

  • Real-time : ~200ms์˜ ์‹ค์‹œ๊ฐ„ ์ฒ˜๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Destination

      1. SDK๋ฅผ ์‚ฌ์šฉํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜(real time์ฒ˜๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ)

      1. Lambda

      1. Kinesis Data Firehose

      1. Kinesis Data Analytics

  • Shard๋ฅผ ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ํ™•์žฅํ•˜๊ฑฐ๋‚˜ ์ถ•์†Œํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— fully managed service๋Š” ์•„๋‹ˆ๋‹ค.

#76 Kinesis Data Firehose

  • Fully Managed Service, no administration, automatic scaling, serverless : Kinesis Data Streams์™€ ๋‹ฌ๋ฆฌ fully managed service์ด๋‹ค.

  • ๋ฐฐ์น˜ ์ฒ˜๋ฆฌ๋ฅผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ฒ˜๋ฆฌ์— ์‹œ๊ฐ„์ด ๊ฑธ๋ฆฐ๋‹ค. ๋”ฐ๋ผ์„œ Near Real Time์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.

    • 60 seconds latency minimum for non full batches

    • Or minimum 32 MB of data at a time

  • Kinesis Data Streams์™€ ๋‹ฌ๋ฆฌ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•œ ํ›„ batch ์ฒ˜๋ฆฌํ•ด์„œ consumers์—๊ฒŒ ์ „๋‹ฌํ•œ๋‹ค.(์ด ๊ฐ€๊ณต ๊ณผ์ •๊ณผ, batch์ฒ˜๋ฆฌ ๊ธฐ๊ฐ„์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— real time์œผ๋กœ ์‚ฌ์šฉ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.)

  • Destination

      1. datadog๊ฐ™์€ ๋ชจ๋‹ˆํ„ฐ๋ง 3rd-party destination

      1. S3, Redshift(ํŽ˜ํƒ€๋ฐ”์ดํŠธ ์ด์ƒ์˜ ๋Œ€๊ทœ๋ชจ ๋ฐ์ดํ„ฐ ์ €์žฅ์†Œ ๋ฐ ๋ถ„์„ ์„œ๋น„์Šค), ElasticSearch์™€ ๊ฐ™์€ aws destination

      1. http endpoint

  • ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ Kinesis Data Streams์™€ ๋‹ฌ๋ฆฌ data replay๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.

#77 Kinesis Data Analytics

  • Kinesis Data Streams๋˜๋Š” Kinesis Data Firehose๋กœ๋ถ€ํ„ฐ ์ „๋‹ฌ๋ฐ›์€ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ SQL์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค

  • Fully Managed Service์ด๋‹ค.

  • Real-time์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ๋ถ„์„์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Kinesis Data Streams๋˜๋Š” Kinesis Data Firehose๋ฅผ source๋กœ ํ•˜๊ณ  ์ด ๋ฐ์ดํ„ฐ๋ฅผ ๋Œ€์ƒ์œผ๋กœ SQL์„ ์‹คํ–‰ํ•˜๊ณ  ๋‹ค์‹œ Kinesis Data Streams๋˜๋Š” Kinesis Data Firehose์— ์ „๋‹ฌํ•˜๋Š” ๊ตฌ์กฐ์ด๋‹ค.

  • ํฌ๊ฒŒ ๋‘ ๊ฐ€์ง€ ๊ตฌ์กฐ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

    • SQL์‹คํ–‰ ํ›„ ๋‹ค์‹œ Kinesis Data Streams์— ์ „๋‹ฌํ•ด Kinesis Data Streams๊ฐ€ APP์ด๋‚˜ Lambda๋กœ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹

    • SQL์‹คํ–‰ ํ›„ ๋‹ค์‹œ Kinesis Data Firehose์— ์ „๋‹ฌํ•ด Kinesis Data Firehose๊ฐ€ S3๋‚˜ Redshift๊ฐ™์€ ์ €์žฅ์†Œ๋กœ ์ „๋‹ฌํ•ด ์ €์žฅํ•˜๋Š” ๋ฐฉ์‹

#78 Ordering data into Kinesis

  • Partition key๋ฅผ kinesis์— ๋ณด๋‚ด๋ฉด hashํ•ด์„œ ์•Œ๋งž์€ shard๋กœ ๋ฐฐ์น˜ํ•œ๋‹ค.

  • The same key will always go to the same shard : ์˜ˆ๋ฅผ ๋“ค์–ด 1๋ฒˆ partition key๊ฐ€ 1๋ฒˆ ์ƒค๋“œ์— ๋ฐฐ์น˜๋˜๊ณ , 2๋ฒˆ partition key๊ฐ€ 2๋ฒˆ ์ƒค๋“œ์— ๋ฐฐ์น˜๋˜์—ˆ๋‹ค๋ฉด, ๊ทธ ์ดํ›„์—๋„ 1๋ฒˆ partition key๋Š” 1๋ฒˆ ์ƒค๋“œ์— ๋ฐฐ์น˜๋˜๊ณ , 2๋ฒˆ partition key๋Š” 2๋ฒˆ ์ƒค๋“œ์— ๋ฐฐ์น˜๋˜๋Š” ์‹œ์Šคํ…œ์ด๋‹ค.

#79 Ordering data into SQS

  • kinesis์™€ ์ •๋ ฌ ๋งค์ปค๋‹ˆ์ฆ˜์ด ๋‹ค๋ฅด๋‹ค.

  • For SQS FIFO, if you donโ€™t use a Group ID, messages are consumed in the order they are sent, with only one consumer : sqs๋Š” consumer๊ฐ€ ๋ฉ”์‹œ์ง€๋ฅผ consumeํ•œ ํ›„ ๊ทธ ๋ฉ”์‹œ์ง€๋ฅผ ์ง€์šฐ๋Š” ๊ฒƒ์ด ์ผ๋ฐ˜์ ์ด๊ณ , ํ•œ consumer์— ์˜ํ•ด์„œ ์ด ์ž‘์—…์ด ์ด๋ฃจ์–ด์ง„๋‹ค. group id๊ฐ€ ์—†๋‹ค๋ฉด ๋ฉ”์‹œ์ง€๋Š” ๋ณด๋‚ธ ์ˆœ์„œ๋Œ€๋กœ ์ฝํ˜€์งˆ ๊ฒƒ์ด๋‹ค.

  • 413p ์ฐธ๊ณ 

#80 SQS VS SNS VS KINESIS

  • SQS

    • Data is deleted after being consumed

    • No need to provision throughput

  • SNS

    • Data is not persisted (lost if not delivered) : ๋ฐ์ดํ„ฐ๋Š” ์–ด๋–ค ์ด์œ ๋กœ ์ „๋‹ฌ๋˜์ง€ ๋ชปํ–ˆ์„ ๊ฒฝ์šฐ ์ €์žฅ๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋ฐ์ดํ„ฐ๊ฐ€ ์‚ฌ๋ผ์งˆ ์ˆ˜ ์žˆ๋‹ค.

    • No need to provision throughput

    • Integrates with SQS for fan- out architecture pattern : ํ•œ ๋ฉ”์‹œ์ง€๋ฅผ ์—ฌ๋Ÿฌ consumer๊ฐ€ ์†Œ๋น„ํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•จ.

  • KINESIS

    • Throughput

      • Standard: pull data - 2 MB per shard

      • Enhanced-fan out: push data - 2 MB per shard per consumer

    • Possibility to replay data : Kinesis Data Streams์˜ ๊ฒฝ์šฐ ๋ฐ์ดํ„ฐ๊ฐ€ ์ €์žฅ๋˜๋ฏ€๋กœ ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์ž‘์—… ๊ฐ€๋Šฅ

#81 Amazon MQ

  • Amazon MQ = managed Apache ActiveMQ

  • on-premise mq๊ฐ€ MQTT, AMQP๊ฐ™์€ ๊ธฐ์กด์— ์กด์žฌํ•˜๋˜ ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ ํด๋ผ์šฐ๋“œ๋กœ ์ด์ „ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด AMAZON MQ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.(SNS, SQS๋กœ์˜ ์ด์ „์ด ์•„๋‹ˆ๋ผ๋Š” ์  ์ฃผ์˜)

  • High Availability๋ฅผ ์ง€์›ํ•œ๋‹ค.

#82 Docker

  • Docker is a software development platform to deploy apps : ์†Œํ”„ํŠธ์›จ์–ด ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ํ”Œ๋žซํผ, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ปจํ…Œ์ด๋„ˆ ์•ˆ์— ๋‹ด์„ ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ํ”Œ๋žซํผ

#83 Docker vs Virtual Machines

  • Docker is โ€sort ofโ€ a virtualization technology, but not exactly : ๋„์ปค๋Š” ์ผ์ข…์˜ ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ์ด์ง€๋งŒ, ๊ฐ€์ƒํ™” ๊ทธ ์ž์ฒด๋Š” ์•„๋‹ˆ๋‹ค.

  • 421p. Resources are shared with the host => many containers on one server : ํ•œ ์„œ๋ฒ„์— ์—ฌ๋Ÿฌ ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์˜ฌ๋ผ๊ฐ€ ์žˆ๋‹ค๋ฉด, ์ €์žฅ์†Œ๋‚˜ ๋„คํŠธ์›Œํฌ๋ฅผ ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ๊ฐ„์—, ํ˜น์€ ํ˜ธ์ŠคํŠธ์™€ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ๋ฐ˜๋ฉด ๊ฐœ๋ณ„ Virtual Machine(Guest OS)์€ ํ˜ธ์ŠคํŠธ OS์™€ ์ž์›์„ ๊ณต์œ ํ•˜์ง€ ์•Š๋Š”๋‹ค.

#84 ECS

  • 2๊ฐœ์˜ launch type

      1. ec2 launch type : ์ง์ ‘ ec2๋ฅผ ํ™•์žฅํ•˜๊ฑฐ๋‚˜ ์ถ•์†Œ์‹œํ‚จ๋‹ค.

      1. fargate : ec2 ๊ด€์—ฌ ํ•„์š” ์—†์ด serverless๋กœ ๋™์ž‘ํ•œ๋‹ค.

  • EC2 launch type : ECS Cluster ๋‚ด๋ถ€์— ์—ฌ๋Ÿฌ ๊ฐœ์˜ Container Instance๊ฐ€ ์žˆ๊ณ , ๊ฐœ๋ณ„ Container Instance ๋‚ด๋ถ€์—๋Š” ECS Agent๊ฐ€ ์žˆ๊ณ , ์ด ECS Agent๊ฐ€ Container Instance ๋‚ด๋ถ€์˜ task๋“ค์„ ์™ธ๋ถ€์— ๋…ธ์ถœ์‹œํ‚ค๋Š” ์—ญํ• ์„ ํ•œ๋‹ค. a task๋Š” ํ•œ ๊ฐœ์˜ ์‹คํ–‰ ์ค‘์ธ ๋„์ปค ์ปจํ…Œ์ด๋„ˆ๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ํŽธํ•˜๋‹ค.

  • Fargate : ECS Cluster ๋‚ด๋ถ€์—์„œ, ํ•œ ๊ฐœ์˜ task์— ํ•œ ๊ฐœ์˜ ENI๊ฐ€ ๋ถ™๋Š”๋‹ค. ๋”ฐ๋ผ์„œ ๋งŽ์€ task๊ฐ€ ์กด์žฌํ•œ๋‹ค๋ฉด ๊ทธ ๋งŒํผ์˜ ip๋ฅผ ๊ฐ๋‹นํ•ด์•ผ ํ•˜๋ฏ€๋กœ ๋„คํŠธ์›Œํฌ๊ฐ€ ์ถฉ๋ถ„ํžˆ ์ปค์•ผ ํ•œ๋‹ค.

  • EC2 Instance Profile : ECS agent๊ฐ€ ๊ฐ€์ง€๋Š” ๊ถŒํ•œ์ด๋‹ค. 427p ์ฐธ๊ณ 

  • ECS Task Role : ๊ฐœ๋ณ„ ํƒœ์Šคํฌ๊ฐ€ ๊ฐ€์ง€๋Š” ๊ถŒํ•œ(role)์ด๋‹ค. ์ด role์— ํ•ด๋‹นํ•˜๋Š” ๊ถŒํ•œ๋งŒ ๊ฐ€์ง€๊ณ  ๋‹ค๋ฅธ aws ์„œ๋น„์Šค์— ์ ‘๊ทผํ•œ๋‹ค.

  • ECS์—์„œ CloudWatch์— ์˜ํ•œ Scaling์ž‘์—…์„ ํ•  ๋•Œ, ๋‘ ๋‹จ๊ณ„์˜ Scaling์ด ์ด๋ฃจ์–ด์ง„๋‹ค.

      1. task์˜ ๊ฐœ์ˆ˜๋ฅผ ๋Š˜๋ ค ์„œ๋น„์Šค ์ปจํ…Œ์ด๋„ˆ์˜ ์ˆ˜๋ฅผ ๋Š˜๋ฆฌ๋Š” ์ž‘์—… : ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์ธ์Šคํ„ด์Šค์˜ capacity๋ฅผ ์ดˆ๊ณผํ•ด์„œ ์ƒ์„ฑ๋  ์ˆ˜๋Š” ์—†๋‹ค.

      1. Scale ECS Capacity Providers : ๋”ฐ๋ผ์„œ ์ธ์Šคํ„ด์Šค๋ฅผ ์ˆ˜ํ‰์ ์œผ๋กœ ๋Š˜๋ฆฌ๋Š” ์ž‘์—…์„ ECS Capacity Providers๊ฐ€ ๋„์™€์ค€๋‹ค.

    • ์ด ์ž‘์—…์ด ๊ฐ€๋Šฅํ•˜๋ ค๋ฉด fargate๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ec2 launch type์ด์–ด์•ผ ํ•˜๊ณ , ๋‹น์—ฐํ•˜๊ฒŒ๋„ auto scaling group์„ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

  • ECS Rolling Update

    • ์ปจํ…Œ์ด๋„ˆ ์—…๋ฐ์ดํŠธ๋ฅผ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ•˜๋‚˜์˜ ๋ฐฉ๋ฒ•์œผ๋กœ, ํƒœ์Šคํฌ๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ํŽธํ•˜๋‹ค.

    • ์ปจํ…Œ์ด๋„ˆ ์—…๋ฐ์ดํŠธ๋ฅผ ์œ„ํ•ด์„œ๋Š” ์ปจํ…Œ์ด๋„ˆ๊ฐ€ remove๋˜๊ณ , ์ƒˆ๋กœ์šด ์ปจํ…Œ์ด๋„ˆ๋กœ ์‹คํ–‰๋˜์–ด์•ผ ํ•œ๋‹ค.

    • ์ดˆ๊ธฐ ํƒœ์Šคํฌ ์ˆ˜ ๊ธฐ์ค€์œผ๋กœ, ํผ์„ผํŠธ ๋‹จ์œ„๋กœ ํƒœ์Šคํฌ์˜ ์‹คํ–‰ ๊ฐœ์ˆ˜๋ฅผ ์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

#85 EKS

  • ECS์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์•„๋ž˜์˜ launch type์„ ์ง€์›ํ•œ๋‹ค.

      1. ec2 launch type : ์ง์ ‘ ec2๋ฅผ ํ™•์žฅํ•˜๊ฑฐ๋‚˜ ์ถ•์†Œ์‹œํ‚จ๋‹ค.

      1. fargate : ec2 ๊ด€์—ฌ ํ•„์š” ์—†์ด serverless๋กœ ๋™์ž‘ํ•œ๋‹ค.

  • ์ž์„ธํ•œ ๊ตฌ์กฐ 441p ์ฐธ๊ณ 

  • ECS์—์„œ๋Š” task๋ผ๊ณ  ๋ถ€๋ฅด๋˜ ์ปจํ…Œ์ด๋„ˆ๊ฐ€, EKS์—์„œ๋Š” pod๋ผ๊ณ  ๋ถˆ๋ฆฌ๊ณ , ํ•œ ๊ฐœ์˜ EC2 Instance๋ฅผ EKS node๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.

#86 Lambda

  • Virtual functions โ€“ no servers to manage! : ์š”์ฒญ ํšŸ์ˆ˜ ๋˜๋Š” GB-seconds๋กœ ์š”๊ธˆ์ด ๊ณ„์‚ฐ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์š”์ฒญ ํšŸ์ˆ˜๋ฅผ ์˜ˆ์ƒํ•  ์ˆ˜ ์—†๊ฑฐ๋‚˜, ์š”์ฒญ ํšŸ์ˆ˜๊ฐ€ ์ ์„ ๋•Œ ํšจ๊ณผ์ ์ด๋‹ค.

#87 Lambda@Edge

  • Lambda๋ฅผ CloudFront์ฒ˜๋Ÿผ ์“ธ ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ์„œ๋น„์Šค

#88 DynamoDB

  • Fully managed, highly available with replication across multiple AZs : ์„œ๋ฒ„ ๋ฆฌ์Šค NoSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค with multi AZ

  • Provisioned Mode(default)

    • Pay for provisioned Read Capacity Units (RCU) & Write Capacity Units (WCU) : ๋ฏธ๋ฆฌ capacity๋ฅผ ์ •ํ•ด์„œ ์˜ˆ์ƒ๋œ ํŠธ๋ž˜ํ”ฝ์— ๋Œ€์‘ํ•œ๋‹ค.

  • On-Demand Mode

    • Read/writes automatically scale up/down with your workloads : ํŠธ๋ž˜ํ”ฝ์„ ์˜ˆ์ƒํ•  ์ˆ˜ ์—†์„ ๋•Œ ์ž๋™์œผ๋กœ scaleํ•ด์ฃผ๋Š” ๋ชจ๋“œ, ๋‹น์—ฐํžˆ default๋ณด๋‹ค ๋” ๋น„์‹ธ๋‹ค.

#89 DynamoDB Accelerator (DAX)

  • Fully-managed, highly available, seamless in memory cache for DynamoDB : DynamoDB์ „์šฉ ์บ์‹œ

  • DynamoDB Accelerator(DAX) vs ElastiCache

    • DynamoDB์— **DynamoDB Accelerator(DAX)**๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด DynamoDB์˜ ๊ฐœ๋ณ„ object, ์ฟผ๋ฆฌ ๊ฒฐ๊ณผ๋ฅผ ์บ์‹œํ•  ์ˆ˜ ์žˆ๋‹ค.

    • ElastiCache๋„ ๊ฐ™์ด ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ๋ฐ, ElastiCache๋Š” Application์ด DynamoDB ๋˜๋Š” DynamoDB Accelerator(DAX)์œผ๋กœ๋ถ€ํ„ฐ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›๊ณ  ์ด ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€๊ณตํ•œ ํ›„ ์ด ๋ฐ์ดํ„ฐ๋ฅผ ์บ์‹œํ•˜๊ณ  ์‹ถ์„ ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค. ์ด๋ฅผ Store Aggregation Result๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.

    • ์œ„ ์ผ€์ด์Šค์—์„œ ๋‘˜์˜ ์ฐจ์ด์ ์€ ๋ฐ์ดํ„ฐ ๊ฐ€๊ณต์—ฌ๋ถ€๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

#90 DynamoDB Streams

  • Ordered stream of item-level modifications (create/update/delete) in a table

  • DynamoDB์˜ object๋ฅผ create/update/deleteํ•  ๋•Œ ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•ด DynamoDB Streams๊ฐ€ ๋ฐœ์ƒํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ๊ตฌ์กฐ 464p ์ฐธ๊ณ 

#91 DynamoDB Features

  • DynamoDB Global Tables

    • active-active replication์˜ multi region๋ฐฉ์‹์„ ์ง€์›ํ•œ๋‹ค.(region์€ 2๊ฐœ ์ด์ƒ ๊ฐ€๋Šฅ)

    • Applications can READ and WRITE to the table in any region : ์•„๋ฌด๋ฐ๋‚˜ READ, WRITEํ•ด๋„ active-active replication์ด๊ธฐ ๋•Œ๋ฌธ์— ์ƒ๊ด€ ์—†๊ณ , multi region์ด๊ธฐ ๋•Œ๋ฌธ์— low latency๋ผ๋Š” ์žฅ์ ์ด ์žˆ๋‹ค.

    • Must enable DynamoDB Streams as a pre-requisite : DynamoDB Streams์„ ํ•„์ˆ˜์ ์œผ๋กœ ํ™œ์„ฑํ™”ํ•ด์•ผ ํ•จ

  • Time To Live

    • expire time์„ ์ง€์ •ํ•ด์„œ 1.item์ด ๋„ˆ๋ฌด ๋งŽ์•„์ง€๊ฑฐ๋‚˜ 2.์„ธ์…˜ ๊ด€๋ฆฌ๋ฅผ ํ•ด์•ผํ•  ๊ฒฝ์šฐ, item์„ ์‚ญ์ œํ•˜๋Š” ์šฉ๋„๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

  • Indexes

    • DynamoDB์—์„œ ์ฟผ๋ฆฌ๋Š” Primary key๋ฅผ ๋Œ€์ƒ์œผ๋กœ๋งŒ ๊ฐ€๋Šฅํ•œ๋ฐ ์ธ๋ฑ์Šค๋ฅผ ์„ค์ •ํ•˜๋ฉด attributes๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์ฟผ๋ฆฌ๊ฐ€ ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Transactions

    • A Transaction is written to both tables, or none! : rds๋กœ ์˜ˆ๋ฅผ ๋“ค๋ฉด ์™ธ๋ž˜ํ‚ค๋ฅผ ์„ค์ •ํ–ˆ์„ ๋•Œ ์ž์‹ ํ…Œ์ด๋ธ”๊ณผ ๋ถ€๋ชจ ํ…Œ์ด๋ธ”์˜ ๋ฐ์ดํ„ฐ๋ฅผ ๋™๊ธฐํ™”ํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ถ€๋ชจ ํ…Œ์ด๋ธ”์˜ ์™ธ๋ž˜ํ‚ค update๊ฐ€ cascade๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์ด๋ฅผ DynamoDB์—์„œ๋Š” transaction์ด๋ผ๋Š” ๊ฐœ๋…์œผ๋กœ ๋™์‹œ์— ์“ฐ๊ฑฐ๋‚˜ ๋™์‹œ์— ์“ฐ์ง€ ์•Š๋Š” ๋ฐฉ์‹์œผ๋กœ ๊ตฌํ˜„ํ–ˆ๋‹ค๊ณ  ๋ณด๋ฉด ๋œ๋‹ค.(๋ฐ์ดํ„ฐ๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒฝ์šฐ ๋™์ผ ๋ฐ์ดํ„ฐ ๋ณด์žฅ)

#92 AWS API Gateway

  • Edge-Optimized(default) mode: For global clients

    • Requests are routed through the CloudFront Edge locations (improves latency) : ์š”์ฒญ์„ ๋ฐ›์„ ๋•Œ CloudFront๋ฅผ ์‚ฌ์šฉํ•ด latency๋ฅผ ์ค„์ด๊ณ , ์‹ค์ œ๋กœ๋Š” ํ•œ region์—๋งŒ api gateway๋ฅผ ๋‘๋Š” ๋ฐฉ์‹์ด๋‹ค.

  • Regional mode

    • Edge-Optimized(default)์™€ ๋น„์Šทํ•˜๊ฒŒ CloudFront๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ ๊นŒ์ง„ ๊ฐ™์€๋ฐ, ์ง€์—ญ ํ•œ์ •์œผ๋กœ ๋™์ž‘ํ•˜๋ฏ€๋กœ ์บ์‹œ๋ฅผ ๋‹ค๋ฃฐ ๋•Œ ๋”์šฑ ์„ธ๋ถ€์ ์œผ๋กœ ๋‹ค๋ฃฐ ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.

  • Private mode

    • Can only be accessed from your VPC : private VPC์—์„œ ENI๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ ‘๊ทผํ•œ๋‹ค.

#93 API Gateway โ€“ Security

  • IAM Permissions

    • Sig v4๋ผ๋Š” ์ผ์ข…์˜ ์„œ๋ช…ํ‚ค๋ฅผ ์š”์ฒญ ํ—ค๋” ๋˜๋Š” ์ฟผ๋ฆฌ ๋ฌธ์ž์—ด์— ์ถ”๊ฐ€ํ•œ๋‹ค.

    • ์ด ์„œ๋ช…ํ‚ค๋ฅผ API Gateway์— ๋ณด๋‚ด๋ฉด API Gateway๊ฐ€ IAM service์—๊ฒŒ IAM policy check์„ ์š”์ฒญํ•œ๋‹ค.

    • ์ธ์ฆ๊ณผ ์ธ๊ฐ€ ๋‘˜ ๋‹ค ๊ฐ€๋Šฅ

  • Lambda Authorizer (formerly Custom Authorizers)

    • Token์„ ์š”์ฒญ ํ—ค๋”์— ๋‹ด์•„ API Gateway์— ๋ณด๋‚ด๋ฉด API Gateway๊ฐ€ Lambda Authorizer์—๊ฒŒ token check์„ ์š”์ฒญํ•œ๋‹ค.

    • ํ† ํฐ์ด ์œ ํšจํ•˜๋‹ค๋ฉด IAM Permission๊ณผ ๋™์ผํ•˜๊ฒŒ IAM policy๋ฅผ ๋ฆฌํ„ดํ•œ๋‹ค.

    • IAM Permissions์˜ Sig v4๋ผ๋Š” AWS์ „์šฉ ์„œ๋น„์Šค๊ฐ€ ์•„๋‹ˆ๋ผ OAuth๊ฐ™์€ third party ์ธ์ฆํƒ€์ž…์„ ์ง€์›ํ•˜๋Š” ๊ฒƒ์ด ์ฃผ์š” ๊ธฐ๋Šฅ์ด๋‹ค.

    • ์ธ์ฆ๊ณผ ์ธ๊ฐ€ ๋‘˜ ๋‹ค ๊ฐ€๋Šฅ

  • Cognito User Pools

    • Cognito fully manages user lifecycle : serverless ์œ ์ € ์ธ์ฆ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค(๋ชจ๋ฐ”์ผ ํŠนํ™”)

      1. Cognito User Pools์— ์ธ์ฆ ์š”์ฒญ์„ ํ•˜๊ณ  ํ† ํฐ์„ ๋ฐ›๋Š”๋‹ค.

      1. API Gateway์— ํ† ํฐ๊ณผ ์š”์ฒญ์„ ํ•จ๊ป˜ ๋ณด๋‚ธ๋‹ค.

      1. API Gateway๋Š” Cognito User Pools์— ์ด ํ† ํฐ์ด ์žˆ๋Š” ์ง€ ํ™•์ธํ•œ๋‹ค.

    • IAM Permissions, Lambda Authorizer์™€ ๋‹ค๋ฅธ ์ ์€ ๋ฐ”๋กœ API Gateway์— ์š”์ฒญํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ๊ทธ ์ด์ „์— Cognito User Pools์œผ๋กœ๋ถ€ํ„ฐ ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์ด ํ•„์š”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— Cognito User Pools์— ๋จผ์ € ์ธ์ฆ์š”์ฒญ์„ ๋ณด๋‚ด์•ผ ํ•œ๋‹ค.

    • ์ธ์ฆ๋งŒ ๊ฐ€๋Šฅ

#94 AWS Cognito

  • Cognito User Pools

    • Sign in functionality for app users : ๋ชจ๋ฐ”์ผ ์•ฑ์„ ์œ„ํ•œ ์ธ์ฆ ์ œ๊ณต

    • Sends back a JSON Web Tokens (JWT) : (๋ชจ๋ฐ”์ผ App์„ ์œ„ํ•ด์„œ) ๋กœ๊ทธ์ธ ์‹œ jwt๋ฅผ ์ œ๊ณตํ•ด์ค€๋‹ค.(์•ฑ์€ ์ฟ ํ‚ค ์„ธ์…˜ ๊ด€๋ฆฌ๊ฐ€ ํž˜๋“ค๋‹ค๊ณ  ์•Œ๊ณ  ์žˆ์Œ - ํ•™์Šต ํ•„์š”)

    • Integrate with API Gateway์™€ ํ•จ๊ป˜ ๋™์ž‘

  • Cognito Identity Pools (Federated Identity)

    • AWS resources์— ์ง์ ‘ ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•œ AWS credentials์„ ์ œ๊ณตํ•œ๋‹ค.

    • identity provider๋กœ Cognito User Pools๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

      1. ํด๋ผ์ด์–ธํŠธ๊ฐ€ identity provider์— ๋กœ๊ทธ์ธ ์š”์ฒญ์„ ๋ณด๋‚ธ๋‹ค.

      1. identity provider๋Š” ์‘๋‹ต์œผ๋กœ ํ† ํฐ์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

      1. ํ† ํฐ์„ Federated Identity๋กœ ๋ณด๋‚ธ๋‹ค.

      1. Federated Identity๋Š” identity provider์—๊ฒŒ ํ† ํฐ์„ ๊ฒ€์ฆํ•œ๋‹ค.

      1. ํ† ํฐ์ด ์œ ํšจํ•˜๋‹ค๋ฉด STS์—์„œ credential๋ฅผ ํš๋“ํ•ด temp credential์„ client์—๊ฒŒ ๋ฆฌํ„ดํ•œ๋‹ค.

      1. client๋Š” temp credential์„ ์ด์šฉํ•ด์„œ aws service์— ์ง์ ‘ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

    • ์‚ฌ์šฉ ์‚ฌ๋ก€ : ํŽ˜์ด์Šค๋ถ ๋กœ๊ทธ์ธ์œผ๋กœ s3์— ์ง์ ‘ ์“ฐ๊ธฐ ๊ถŒํ•œ์„ ์–ป๊ณ  ์‹ถ์„ ๋•Œ

  • Cognito Sync == Appsync

    • Requires Federated Identity Pool in Cognito (not User Pool) : Federated Identity Pool์ด ์š”๊ตฌ์กฐ๊ฑด์ด๋‹ค.

    • Store preferences, configuration, state of app : app์˜ ์ƒํƒœ, ์„ค์ •์„ ์ €์žฅํ•œ๋‹ค.

    • Cross device synchronization : ๋ฉ€ํ‹ฐ ๋””๋ฐ”์ด์Šค ๊ฐ„ ์‹ฑํฌ ๊ฐ€๋Šฅ

    • Offline capability : ์˜คํ”„๋ผ์ธ ์ƒํƒœ์—ฌ๋„ ์˜จ๋ผ์ธ๋˜๋ฉด ์‹ฑํฌ ๊ฐ€๋Šฅ

    • Store data in datasets : dataset์— data๋ฅผ ์ €์žฅํ•˜๊ณ  dataset์€ ์ตœ๋Œ€ 20๊ฐœ๊นŒ์ง€ ๊ฐ€๋Šฅ

#95 AWS SAM - Serverless Application Model

  • Framework for developing and deploying serverless application : ์ด๋Ÿฐ ํ”„๋ ˆ์ž„์›Œํฌ๋„ ์žˆ๋‹ค๋Š” ๊ฒƒ๋งŒ ์•Œ์•„๋‘๊ธฐ

#96 AWS Database Types

  • RDBMS : RDS, Aurora โ€“ ์ž์œ ๋กœ์šด join

  • NoSQL : DynamoDB(JSON), ElasticCache(Key, Value), Neptune(graphs) - ๋ถˆ์™„์ „ํ•œ ์ฟผ๋ฆฌ, ์กฐ์ธ

  • Object Store : S3, Glacier - ํŒŒ์ผ ์ €์žฅ

  • Data Warehouse : Redshift(OLAP), Athena - ๋ฐ์ดํ„ฐ ๋ถ„์„์„ ์œ„ํ•œ ๋ฐ์ดํ„ฐ ์›จ์–ดํ•˜์šฐ์Šค

  • Search : ElasticSearch (JSON)

  • Graph : Neptune โ€“ displays relationships between data : ๋ฐ์ดํ„ฐ ๊ฐ„ ๊ด€๊ณ„๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ๊ทธ๋ž˜ํ”„ ํ˜•์‹

#97 RDS Features

  • Managed PostgreSQL / MySQL / MariaDB / Oracle / SQL Server

  • (์ฐธ๊ณ ๋กœ ํ˜„์žฌ RDS ์ƒ์„ฑ ํŽ˜์ด์ง€์—์„œ Amazon Aurora๊ฐ€ managed db์ค‘์—์„œ ์ œ์ผ ๋จผ์ € ์„ ํƒ๋˜๋Š” ๊ธฐ๋ณธ์˜ต์…˜์ด๋‹ค. ์ด๊ฒƒ๋งŒ ๋ด๋„ ์•„๋งˆ์กด์ด aurora๋ฅผ ์žฅ๋ คํ•˜๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ ์ˆ˜ ์žˆ๋‹ค. (2022-01-19))

  • DB instance & EBS Volume type and size๋ฅผ ์‚ฌ์ „์— provisionํ•ด์•ผ ํ•œ๋‹ค.

  • Read Replicas & Multi AZ ์ง€์›

  • OLTP - Online Transaction Processing(ํŠธ๋žœ์žญ์…˜ ์ฒ˜๋ฆฌ ๊ฐ€๋Šฅ)

  • ๋™์ž‘ ๋ฐฉ์‹

    • small downtime when failover happens : failover๊ฐ€ ๋ฐœ์ƒํ•  ๋•Œ ์•ฝ๊ฐ„์˜ ๋‹ค์šด ํƒ€์ž„์ด ์žˆ๋‹ค.(์˜ค๋กœ๋ผ๋Š” 30์ดˆ ์ด๋‚ด)

    • ์ฆ‰ maintenance happens, scaling in read replicas / ec2 instance / restore EBS์ด ๋ฐœ์ƒํ•  ๋•Œ ๋‹ค์šด ํƒ€์ž„์ด ์กด์žฌํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

    • Performance: depends on EC2 instance type, EBS volume type, ability to add Read Replicas. Storage auto-scaling & manual scaling of instance : ์ธ์Šคํ„ด์Šค ํƒ€์ž…, ๋ณผ๋ฅจ ํƒ€์ž…์— ๋”ฐ๋ผ ์„ฑ๋Šฅ์ด ๋‹ค๋ฅด๊ณ , read replica๋ฅผ ์ถ”๊ฐ€ํ•ด ์ฝ๊ธฐ ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค๋Š” ์ , ์ €์žฅ์†Œ ์˜คํ† -์Šค์ผ€์ผ๋ง & manual ์Šค์ผ€์ผ๋ง์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ์ ์œผ๋กœ ์ธํ•ด ์„ฑ๋Šฅ์€ ์ฒœ์ฐจ๋งŒ๋ณ„์ด๋‹ค.

  • Backups are automatically enabled in RDS : ์ž๋™ ๋ฐฑ์—…, ๋ฐฑ์—…๋ณธ default ์œ ์ง€ ๊ธฐ๊ฐ„ 7์ผ(์ตœ๋Œ€ 35์ผ), ํŠธ๋žœ์žญ์…˜ ๋กœ๊ทธ๊ฐ€ 5๋ถ„๋งˆ๋‹ค ๋ฐฑ์—…๋จ

  • DB Snapshot : ์œ ์ €๊ฐ€ ์ง์ ‘ ์Šค๋ƒ…์ƒท ์บก์ฒ˜ํ•˜๋Š” ๊ฒƒ

  • Maximum Storage Threshold : rds์˜ storage๋Š” auto-scaling๋˜์ง€๋งŒ auto-scaling์˜ ์ตœ๋Œ€์น˜๋ฅผ ํ•„์ˆ˜์ ์œผ๋กœ ์ •ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

  • Read Replica๋Š” ์ตœ๋Œ€ 5๊ฐœ(multi AZ or multi Region)

  • Replication์€ ๋น„๋™๊ธฐ ์ž‘์—…์ด๋‹ค. ์ฆ‰ ๋งˆ์Šคํ„ฐ ์ธ์Šคํ„ด์Šค์—๋งŒ ์“ฐ๊ณ  ์ฝ๊ธฐ๋งŒ ๊ฐ€๋Šฅํ•œ read replica์— ๋น„๋™๊ธฐ์ ์œผ๋กœ ๋ณต์ œํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ํƒํ•œ๋‹ค.

  • For RDS Read Replicas within the same region, you donโ€™t pay that fee : same region์€ ๊ทธ ๋Œ€๊ฐ€๋กœ ๋ˆ์„ ์ง€๋ถˆํ•˜์ง€ ์•Š๋Š”๋‹ค, cross region read replication์—ญ์‹œ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ cost๊ฐ€ ๋“ ๋‹ค.

  • RDS Multi AZ๋Š” ๋™๊ธฐ ์ž‘์—…์ด๋‹ค. - Zero downtime operation, no cost, ๊ฐ€์šฉ์„ฑ ์ฆ๊ฐ€(Increase availability), scaling์ด ์•„๋‹Œ Disaster Recovery์„ ์œ„ํ•ด ์‚ฌ์šฉ

  • 173p Multi-AZ ๋™์ž‘ ๊ณผ์ • ํ•„ํžˆ ์ฐธ๊ณ 

  • Security

    • No SSH access : ssh ์ ‘์† ์•ˆ ๋œ๋‹ค. ํ•„ํžˆ ๊ธฐ์–ต.

    • If the master is not encrypted, the read replicas cannot be encrypted : ๋งˆ์Šคํ„ฐ ์ธ์Šคํ„ด์Šค๊ฐ€ encrypt๋˜์ง€ ์•Š์œผ๋ฉด replica๋„ encrypt๋˜์ง€ ์•Š๋Š”๋‹ค.

    • Possibility to encrypt the master & read replicas with AWS KMS - AES-256 encryption : ์ €์žฅ๋œ ๋ฐ์ดํ„ฐ ์•”ํ˜ธํ™”๋ฅผ at rest encryption์ด๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.

    • In-flight encryption : SSLํ†ต์‹ ์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” MySQL๊ฐ™์€ DB์— GRANT USAGE ON . TO 'mysqluser'@'%' REQUIRE SSL; ๊ฐ™์ด ์„ค์ •์„ ํ•ด์ค˜์•ผ ํ•œ๋‹ค.

    • Network Security : security group can communicate with RDS (ec2์˜ ๋ณด์•ˆ ๊ทธ๋ฃน๊ณผ ๊ฐ™์€ ๊ฐœ๋…)

    • RDS์— IAM Authentication์„ ์ ์šฉ์‹œํ‚ค๋ฉด ec2์—์„œ iam role์ด iam์œผ๋กœ๋ถ€ํ„ฐ ํ† ํฐ์„ ๋ฐ›์•„์™€ rds์— ssl๋กœ ์ ‘์†ํ•œ๋‹ค.

#98 Amazon Aurora Features

  • Define EC2 instance type for aurora instances

  • Data is held in 6 replicas, across 3 AZ

  • 5x performance improvement over MySQL on RDS, over 3x the performance of Postgres on RDS : ์„ฑ๋Šฅ์ด ์ข‹๋‹ค.

  • Aurora storage automatically grows in increments of 10GB, up to 128 TB : rds์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์˜คํ†  ์Šค์ผ€์ผ๋ง์„ ์ง€์›ํ•œ๋‹ค.

  • Aurora can have 15 replicas while MySQL has 5, and the replication process is faster

  • Failover in Aurora is instantaneous. Itโ€™s HA (High Availability) native.

  • Support for Cross Region Replication

  • Shared Storage Volume

    • ํ•œ ๊ฐœ์˜ ๋งˆ์Šคํ„ฐ๋งŒ ๋ฐ์ดํ„ฐ๋ฅผ ์จ๋„ ๋ชจ๋“  ์ธ์Šคํ„ด์Šค๊ฐ€ ๋ณผ๋ฅจ์„ ๊ณต์œ ํ•˜๋ฏ€๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ฝ์–ด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

    • Shared Storage Volume์€ Replication + Self Healing + Auto Expanding์˜ ํŠน์„ฑ์„ ์ง€๋‹Œ๋‹ค.

  • Aurora DB Cluster : 181p ์ฐธ๊ณ 

  • Aurora Multi-Master : ๋ฉ€ํ‹ฐ ๋งˆ์Šคํ„ฐ ์ฆ‰๊ฐ์ ์ธ failover์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ค€๋‹ค. 30์ดˆ๋„ ๊ธธ๋‹ค๊ณ  ์ƒ๊ฐํ•œ๋‹ค๋ฉด ๋ฉ€ํ‹ฐ ๋งˆ์Šคํ„ฐ ์‚ฌ์šฉ๊ฐ€๋Šฅ.

  • Aurora Global Database (recommended)

    • disaster recovery๊ฐ€ 1๋ถ„ ์•ˆ์— ๊ฐ€๋Šฅ

    • decreasing latency

    • 1๊ฐœ์˜ ๋งˆ์Šคํ„ฐ ์ธ์Šคํ„ด์Šค, ์ตœ๋Œ€ 16๊ฐœ์˜ read-only์ธ์Šคํ„ด์Šค in ์ตœ๋Œ€ 5๊ฐœ์˜ region, region๊ฐ„์˜ replication lag์€ 1์ดˆ ๋ฏธ๋งŒ์ด๋‹ค.

  • Aurora Serverless โ€“ for unpredictable / intermittent workloads

#99 ElastiCache Features

  • Managed Redis / Memcached (similar offering as RDS, but for caches)

  • Must provision an EC2 instance type

  • Key/Value store, Frequent reads : ์„ธ์…˜ ๊ด€๋ฆฌ ์ตœ์ ํ™”

  • Clustering(Redis), Multi AZ, Read Replicas

  • Redis

    • Multi AZ with auto-failover, Read Replicas, Backup and restore features

    • Read Replicas to scale reads and have high availability

    • AOF(Append Only File) : redis๋Š” in-memory db์ด๋ฏ€๋กœ ์ธ์Šคํ„ด์Šค ์ข…๋ฃŒ ์‹œ ๋ฐ์ดํ„ฐ ์œ ์‹ค์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ ๋ช…๋ น๋ฌธ์ด ์‹คํ–‰๋  ๋•Œ๋งˆ๋‹ค 1์ดˆ ์ •๋„ ๋‹จ์œ„๋กœ ํŒŒ์ผ์— ์ €์žฅํ•œ๋‹ค.

  • MEMCACHED

    • Multi-node for partitioning of data(sharding) : ์ƒค๋”ฉ์ด๋ž€ ํ…Œ์ด๋ธ”์˜ ์ˆ˜ํ‰ ๋ถ„ํ• ์„ ์˜๋ฏธํ•œ๋‹ค. ๋ฐ์ดํ„ฐ๊ฐ€ ๋งŽ์•„์งˆ ๊ฒฝ์šฐ๋ฅผ ๋Œ€๋น„ํ•˜์—ฌ ํ•œ ํ…Œ์ด๋ธ”์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์—ฌ๋Ÿฌ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ๋‚˜๋ˆ„์–ด ์ €์žฅํ•จ์„ ๋งํ•œ๋‹ค. ํ•œ ๋ ˆ์ฝ”๋“œ๋ฅผ ์—ฌ๋Ÿฌ ๋””๋น„์— ์ €์žฅํ•˜๋Š” read replica๊ฐ€ ์•„๋‹ˆ๋ผ, ๋‘ ๋ ˆ์ฝ”๋“œ๋ฅผ ๋‘ ๊ฐœ์˜ db์— ๋‚˜๋ˆ„์–ด ์ €์žฅํ•˜๋Š” ๊ฒƒ์ด ์ƒค๋”ฉ์ด๋‹ค.

    • No high availability(replication), No backup and restore : ๋ฐ์ดํ„ฐ๊ฐ€ ์œ ์‹ค๋˜๋ฉด ๊ทธ๋Œ€๋กœ ์œ ์‹ค๋œ๋‹ค.

    • Multi-threaded architecture

    • Supports SASL(Simple Authentication and Security Layer)-based authentication : ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ํ”„๋กœํ† ์ฝœ๋“ค๋กœ ๋ถ€ํ„ฐ ์ธ์ฆ ๋ฉ”์ปค๋‹ˆ์ฆ˜์„ ๋ถ„๋ฆฌํ•œ ๊ฒƒ์ด SASL์ด๋‹ค. ์ฆ‰ https๊ฐ™์€ ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ , ๋‹ค๋ฅธ ๋ณด์•ˆ ๋ ˆ์ด์–ด๋ฅผ ์‚ฌ์šฉํ•œ ๊ฒƒ์ด๋‹ค.

  • Cache Security

    • Do not support IAM authentication : RDS, AURORA์™€ ๋‹ค๋ฅด๊ฒŒ ElastiCache๋Š” IAM Authentication์„ ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค. IAM Authentication์„ ์‚ฌ์šฉํ•˜๋ฉด ๊ถŒํ•œ์„ ๊ฐ€์ง„ aws์œ ์ €๊ฐ€ redis์— ์–ด๋–ค ๊ฐ’์ด๋“ ์ง€ ๋„ฃ์„ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ทธ๋Ÿฐ ๊ฒƒ์ด ์•„๋‹Œ๊ฐ€ ์ถ”์ธกํ•ด๋ณธ๋‹ค. redis๋Š” ์„ธ์…˜์„ ๊ด€๋ฆฌํ•˜๋Š” ๋ฐ์— ์ฃผ๋กœ ์“ฐ์ด๊ธฐ ๋•Œ๋ฌธ์— ๋ณด์•ˆ์ด ์ค‘์š”ํ•  ์ˆ˜ ๋ฐ–์— ์—†๋‹ค.

    • IAM policies on ElastiCache are only used for AWS API-level security : API-level security ์ •๋„๋งŒ iam policy๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

    • Redis AUTH

      • IAM policies on ElastiCache are only used for AWS API-level security : IAM Policy๋Š” ๊ทธ๋ƒฅ elasticache api๋ฅผ ํ˜ธ์ถœ๊ฐ€๋Šฅํ•œ iam์ธ์ง€๋งŒ ํ™•์ธํ•˜๊ณ , elasticache์— ์ ‘๊ทผํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐ์ž‘ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•˜์ง€๋Š” ์•Š๋Š”๋‹ค๋Š” ๋œป์ป๋‹ค.

      • You can set a password/token when you create a Redis cluster

      • This is an extra level of security for your cache

      • Support SSL in flight encryption

  • Redis Sorted sets guarantee both uniqueness and element ordering

#100 DynamoDB Features

  • AWS proprietary(์ „์šฉ, ๋…์  ์ •๋„์˜ ๋œป) technology, managed NoSQL database

  • Serverless, provisioned capacity, auto scaling, on demand capacity

  • Can replace ElastiCache as a key/value store (storing session data for example)

  • Multi AZ by default

  • Backup / Restore feature

  • Read and Writes are decoupled : ์ฝ๊ธฐ์™€ ์“ฐ๊ธฐ ๋ถ„๋ฆฌ

  • DAX for read cache : elasticache์˜ ๋Œ€์ฒด์žฌ๊ฐ€ ๋  ์ˆ˜ ์žˆ๋Š” ์ด์œ  ์ค‘ ํ•˜๋‚˜์ธ ๊ฒƒ ๊ฐ™๋‹ค.

  • Security, authentication and authorization is done through IAM

  • DynamoDB Streams : ๋ณดํ†ต kinesis ๋˜๋Š” lambda๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

  • Global Table feature : ์ฝ๊ธฐ์™€ ์“ฐ๊ธฐ๋ฅผ ์–ด๋–ค region์—๋„ ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด global table์ด๋‹ค. ์ด๋Š” active-active replication์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€๋Šฅํ•˜๋‹ค. ์—ฌ๋Ÿฌ ์ง€์—ญ ๊ฐ„์— ์–‘๋ฐฉํ–ฅ์˜ replication์ด ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

  • Can only query on primary key, sort key, or indexes

#101 Athena Features

  • Fully Serverless database with SQL capabilities

  • Used to query data in S3, Pay per query, Output results back to S3

  • Secured through IAM

#102 Redshift

  • Redshift is based on PostgreSQL, but itโ€™s not used for OLTP(Online transaction processing)

  • Itโ€™s OLAP โ€“ online analytical processing (analytics and data warehousing) : ์ฆ‰ ์“ฐ๊ธฐ๋ฅผ ์œ„ํ•œ db๊ฐ€์•„๋‹ˆ๋ผ ๋ถ„์„์„ ์œ„ํ•œ db์ด๋‹ค.

  • Columnar storage of data (instead of row based)

  • Massively Parallel Query Execution (MPP) : ๋ถ„์„์„ ์œ„ํ•œ ์ฟผ๋ฆฌ๋ฅผ ๋งŽ์ด ํ•˜๋ฏ€๋กœ ๋ณ‘๋ ฌ ์ฟผ๋ฆฌ๋ฅผ ์ง€์›ํ•œ๋‹ค.

  • BI(Business Intelligence : ๋ฐ์ดํ„ฐ๋ฅผ ๋ถ„์„ํ•˜์—ฌ ํšจ๊ณผ์ ์ธ ์˜์‚ฌ๊ฒฐ์ • ๋„๋ชจ) tools such as AWS Quicksight or Tableau integrate with it

  • Data is loaded from S3, DynamoDB, DMS, other DBsโ€ฆ

  • From 1 node to 128 nodes, up to 128 TB of space per node

  • Redshift Cluster

    • Leader node: for query planning, results aggregation

    • Compute node: for performing the queries, send results to leader

  • Redshift Spectrum: perform queries directly against S3 (no need to load), S3๋ฅผ ๋Œ€์ƒ์œผ๋กœ ๋กœ๋”ฉ์—†์ด ์ฟผ๋ฆฌ ๊ฐ€๋Šฅ

    • Redshift Cluster๊ฐ€ ํ•„์ˆ˜์ ์œผ๋กœ enable๋˜์–ด์•ผ ํ•œ๋‹ค.

  • Backup & Restore์„ ์ง€์›ํ•˜์ง€๋งŒ Multi AZ๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค.

  • ๋”ฐ๋ผ์„œ disaster recovery๋ฅผ snapshot๋ฅผ ์บก์ฒ˜ํ•ด์„œ ์ง์ ‘ ์„ค์ •ํ•ด์ค˜์•ผ ํ•œ๋‹ค. ์Šค๋ƒ…์ƒท์„ ์บก์ฒ˜ํ•ด ๋ฉ€ํ‹ฐ ๋ฆฌ์ „์— ๋ฐฑ์—…ํ•˜๋Š” ๊ณผ์ •์€ ์ž๋™ํ™”(aws ๊ณต์‹ ์ง€์›)๋  ์ˆ˜ ์žˆ๋‹ค. 531p ์ฐธ๊ณ 

  • disaster recovery๋ฅผ ์–ด์ฐŒ ๋˜์—ˆ๋“  ์ž๋™ํ™”๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— auto healing features, cross-region snapshot copy์˜ ํŠน์„ฑ์„ ๊ฐ€์ง„๋‹ค.

  • vs Athena : ์•„ํ…Œ๋‚˜๋„ ์—ญ์‹œ s3๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์ฟผ๋ฆฌํ•˜๋Š”๋ฐ ์•„ํ…Œ๋‚˜์— ๋น„ํ•ด faster queries/joins/aggregations thanks to indexes์˜ ์žฅ์ ์„ ๊ฐ€์ง„๋‹ค.(Redshift๋Š” ์ธ๋ฑ์Šค๋ฅผ ๊ฐ€์ง€๋Š” ํŠน์„ฑ์ด ์žˆ๋‹ค.)

#103 Glue, Neptune

  • 535p ์ฐธ๊ณ 

#104 ElasticSearch

  • Example: In DynamoDB, you can only find by primary key or indexes

  • With ElasticSearch, you can search any field, even partially matches : ElasticSearch๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ NoSQL database๋ผ๊ณ  ํ•œ๋‹ค. ๊ฒ€์ƒ‰ ์—”์ง„์ด๊ธฐ๋„ ํ•œ๋ฐ NoSQL database๋ผ.. ๋” ์กฐ์‚ฌ๊ฐ€ ํ•„์š”ํ•  ๊ฒƒ ๊ฐ™๋‹ค.

  • ๋”ฐ๋ผ์„œ DynamoDB๊ฐ™์€ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ๋ฐ์ดํ„ฐ๋ฅผ storeํ•˜๊ณ  ElasticSearch๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์„œ์น˜ํ•˜๋Š” ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค.

  • Cognito๋ฅผ ์ง€์›ํ•œ๋‹ค.

#105 CloudWatch Metrics

  • Metric์ด๋ž€? : Metric is a variable to monitor (CPUUtilization, NetworkInโ€ฆ)

  • Metrics belong to namespaces : ํ•œ ๋ฉ”ํŠธ๋ฆญ์€ ํ•œ ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ์†ํ•œ๋‹ค.

  • Metrics have timestamps : metric์€ ์‹œ๊ฐ„ ์†์„ฑ์„ ํ•„์ˆ˜์ ์œผ๋กœ ๊ฐ€์ง„๋‹ค. ์ด๋Š” ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” metric๊ฐ„์— ๊ฐ™์€ timestamp๋ฅผ ๊ณต์œ ํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ค‘์š”ํ•˜๋‹ค. dashboard๋กœ ์—ฌ๋Ÿฌ metric๋“ค์„ ๊ด€์ฐฐํ•  ๋•Œ ๊ฐ™์€ ์‹œ๊ฐ„๋Œ€์ธ ๊ฒƒ์ด ๋ณด์žฅ๋˜์–ด์•ผ ํŽธํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

  • Dimension is an attribute of a metric (instance id, environment, etcโ€ฆ) : Up to 10 dimensions per metric

  • EC2 Detailed monitoring : 5๋ถ„๋งˆ๋‹ค metric ๊ฐฑ์‹ ์ด default, Detailed monitoring์„ ์‚ฌ์šฉํ•˜๋ฉด 1๋ถ„๋งˆ๋‹ค ๊ฐฑ์‹  ๊ฐ€๋Šฅ

    • EC2 Memory usage is by default not pushed : ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์€ default์ง€ํ‘œ๊ฐ€ ์•„๋‹ˆ๊ณ , unified agent๋ฅผ ec2 instance๋‚ด๋ถ€์— ์„ค์น˜ ํ›„ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰์„ custom metric์œผ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

  • Custom Metrics

    • Use API call PutMetricData

    • StorageResolution : 1๋ถ„๋งˆ๋‹ค metric ๊ฐฑ์‹ ์ด default, High Resolution์„ ์‚ฌ์šฉํ•˜๋ฉด 1/5/10/30์ดˆ๋งˆ๋‹ค ๊ฐฑ์‹  ๊ฐ€๋Šฅ

    • Accepts metric data points two weeks in the past and two hours in the future (make sure to configure your EC2 instance time correctly) : Cloudwatch๋กœ ๋ณด๋‚ด์ง€๋Š” metric์€ ๊ณผ๊ฑฐ 2์ฃผ, ๋ฏธ๋ž˜ 2์‹œ๊ฐ„ ์‚ฌ์ด์˜ metric๋งŒ ๋ฐ›๋Š”๋‹ค. ๋”ฐ๋ผ์„œ metric์„ ๋ณด๋‚ผ ๋•Œ timestamp๋ฅผ ์ž˜ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค.

  • CloudWatch Dashboards

    • Great way to setup custom dashboards for quick access to key metrics and alarms : ๊ณ„์† ๊ด€์ฐฐํ•ด์•ผ ํ•  key metric์— ๋น ๋ฅด๊ฒŒ ์ ‘๊ทผ ๊ฐ€๋Šฅ

    • Dashboards are global, Dashboards can include graphs from different AWS accounts and regions : ํ•œ ๋Œ€์‹œ๋ณด๋“œ์— ์—ฌ๋Ÿฌ region์˜ metric์„ ๋„ฃ์„ ์ˆ˜ ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ํ•œ๊ตญ region metric๊ณผ ๋ฏธ๊ตญ region metric์ด ํ•œ ๋Œ€์‹œ๋ณด๋“œ์— ๊ณต์กดํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

    • Dashboards can be shared with people who donโ€™t have an AWS account : aws๊ณ„์ •์ด ์—†์–ด๋„ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค๊ณผ ๊ณต์œ ๊ฐ€๋Šฅ, aws๊ณ„์ •์ด ์—†๋Š” ๋‹ค๋ฅธ ํŒ€๊ณผ์˜ ํ˜‘์—…์— ์ข‹์„ ๋“ฏ?

    • You can setup automatic refresh : ๋Œ€์‹œ๋ณด๋“œ๋ฅผ ์‹œ๊ฐ„๋งˆ๋‹ค ์ž๋™ ๊ฐฑ์‹ ๊ฐ€๋Šฅ

#106 CloudWatch Logs

  • Log groups: arbitrary name, usually representing an application : ์˜ˆ๋ฅผ ๋“ค์–ด lambda์—์„œ ๋กœ๊ทธ๊ฐ€ ์Œ“์ธ ๊ฒƒ์ด๋ผ๋ฉด lambda๊ฐ€ prefix๋‚˜ postfix๋กœ ๋ถ™์€ naming์„ ์‚ฌ์šฉํ•œ๋‹ค. ๋ฌผ๋ก  ์ปค์Šคํ…€ ๋กœ๊ทธ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ์ด๋ฆ„์„ ์„ค์ •ํ•œ๋‹ค.

  • Log stream: instances within application / log files / containers - ๋กœ๊ทธ ํŒŒ์ผ์˜ ์šฉ๋Ÿ‰์ด ์–ด๋А ์ •๋„ ์ปค์ง€๋ฉด ๋กœ๊ทธ ํŒŒ์ผ์„ ๋ณด๋‚ผ์ˆ˜๋„ ์žˆ๊ณ , ๋กœ๊ทธ๊ฐ€ ์ƒ๊ธธ ๋•Œ๋งˆ๋‹ค ๋ณด๋‚ผ ์ˆ˜๋„ ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

    • Log group์•ˆ์— Log stream์ด ๋กœ์šฐ์ฒ˜๋Ÿผ ์Œ“์ด๋Š” ๋ฐฉ์‹์ด๋‹ค.

  • Can define log expiration policies (never expire, 30 days, etc..) : never expire๋กœ ์„ค์ •ํ•  ์‹œ ์ผ์ข…์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋กœ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋‹ค.

  • CloudWatch Log์— metric filter๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด, custom metric์„ ๋งŒ๋“ค์–ด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

  • CloudWatch Insights

    • CloudWatch Logs Insights can be used to query logs and add queries to CloudWatch Dashboards : CloudWatch Logs๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์ฟผ๋ฆฌํ•  ์ˆ˜ ์žˆ๊ณ , ์ฟผ๋ฆฌ ๊ฒฐ๊ณผ๋ฅผ dashboard์— ์Œ“์„ ์ˆ˜๋„ ์žˆ๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

  • S3 Export

    • API NAME : CreateExportTask์„ ์‚ฌ์šฉํ•ด์„œ s3๋กœ ๋กœ๊ทธ๋ฅผ exportํ•  ์ˆ˜ ์žˆ๋‹ค.

    • ํ•˜์ง€๋งŒ ์ตœ๋Œ€ 12์‹œ๊ฐ„์ด ๊ฑธ๋ฆฌ๊ธฐ ๋•Œ๋ฌธ์— Not near-real time or real-time์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ „์†กํ•˜๋ ค๋ฉด Logs Subscriptions์„ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

  • CloudWatch Logs Subscriptions

    • CloudWatch Subscription Filter์„ ์‚ฌ์šฉํ•˜๋ฉด Lambdaํ˜น์€ Kinesis์— ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋‚ด real-time์— ๊ฐ€๊น๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. 549p ์ฐธ๊ณ 

  • CloudWatch Logs Agent & Unified Agent

    • By default, no logs from your EC2 machine will go to CloudWatch : ๋”ฐ๋ผ์„œ agent๋ฅผ ec2ํ˜น์€ on-premise server์— ์„ค์น˜ํ•ด ์›ํ•˜๋Š” ๋กœ๊ทธ๋ฅผ ๋ณด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.

    • Unified Agent๋Š” ์ตœ์‹  ๋ฒ„์ „์˜ Logs Agent์ด๊ณ  ๋” ๋งŽ์€ ๊ธฐ๋Šฅ์„ ์ง€์›ํ•œ๋‹ค.

    • Unified Agent

      • Collect additional system-level metrics : CPU, Disk metrics, RAM, Netstat, Processes, Swap Space

#107 CloudWatch Alarms

  • Period

    • metirc์„ ๋ช‡ ์ดˆ๋งˆ๋‹ค ํ‰๊ฐ€ํ•  ๊ฒƒ์ธ๊ฐ€๋ฅผ ์ •ํ•œ๋‹ค.

    • High resolution custom metrics: 10, 30, 60์ดˆ ๋‹จ์œ„๋กœ ์„ค์ • ๊ฐ€๋Šฅ

  • Alarm States

    • OK : ๋ฌธ์ œ ์—†๋Š” ์ƒํƒœ

    • ALARM : ๋ฌธ์ œ ์žˆ๋Š” ์ƒํƒœ

    • INSUFFICIENT_DATA : metric์„ ๋ณด๊ณ  ํŒ๋‹จํ•˜๊ธฐ์— ๋ฐ์ดํ„ฐ๊ฐ€ ๋ถˆ์ถฉ๋ถ„ํ•œ ๊ฒฝ์šฐ

  • Alarm Targets

    • Stop, Terminate, Reboot, or Recover an EC2 Instance

    • Trigger Auto Scaling Action

    • Send notification to SNS

#108 CloudWatch Events

  • Event Pattern: Intercept events from AWS services : aws service์—์„œ ๋ฐœ์ƒํ•˜๋Š” ์ด๋ฒคํŠธ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ๋‹ค.

    • Example sources: EC2 Instance Start, CodeBuild Failure

    • Can intercept any API call with CloudTrail integration

  • Schedule or Cron

    • ์˜ˆ์‹œ๋กœ ํŠน์ • ์ด๋ฒคํŠธ๋ฅผ ๋งค ์‹œ๊ฐ„๋งˆ๋‹ค ๋ฐœ์ƒํ•˜๊ฒŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

  • A JSON payload is created from the event and passed to a target : ๊ธฐ๋ณธ์ ์œผ๋กœ json ํ˜•์‹์œผ๋กœ ์ด๋ฒคํŠธ๊ฐ€ ๋Œ€์ƒ์—๊ฒŒ ์ „๋‹ฌ๋œ๋‹ค.

#109 Amazon EventBridge

  • EventBridge is the next evolution of CloudWatch Events : EventBridge๋Š” CloudWatch Events์˜ ์ตœ์‹  ๋ฒ„์ „์ด๋‹ค.

  • Amazon EventBridge builds upon and extends CloudWatch Events

  • Over time, the CloudWatch Events name will be replaced with EventBridge

  • Default event bus: generated by AWS services (CloudWatch Events) > EC2 Instance Start, CodeBuild Failure๊ฐ™์€ aws specificํ•œ ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ ์‚ฌ์šฉ

  • EventBridge specificํ•œ ๊ธฐ๋Šฅ

    • Partner event bus: receive events from SaaS service or applications (Zendesk, DataDog, Segment, Auth0โ€ฆ)

    • ์˜ˆ๋ฅผ ๋“ค์–ด, ๋ฐ์ดํ„ฐ๋…์—์„œ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋‹ค ๋ฌธ์ œ ์žˆ์„ ๊ฒฝ์šฐ ์ด๋ฒคํŠธ๋ฅผ ๋ฐœ์ƒ์‹œ์ผœ EventBridge๋กœ ์ „๋‹ฌ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

    • Custom Event buses: for your own applications

    • The Schema Registry

      • The Schema Registry allows you to generate code for your application, that will know in advance how data is structured in the event bus

      • ์Šคํ‚ค๋งˆ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ๋Š” event๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ ์ „๋‹ฌ๋  json์„ ์–ด๋–ค ๊ตฌ์กฐ๋กœ ์„ค๊ณ„ํ•  ๊ฒƒ์ธ์ง€๋ฅผ ๋ฏธ๋ฆฌ ์ •ํ•ด๋†“๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ์„œ๋น„์Šค์ด๋‹ค.

      • EventBridge can analyze the events in your bus and infer the schema

  • Event buses can be accessed by other AWS accounts : ๋‹ค๋ฅธ ๊ณ„์ •์— ์˜ํ•ด event bus๊ฐ€ access๊ฐ€๋Šฅํ•œ ๊ฒƒ์€ Partner event bus ๋•Œ๋ฌธ์— ๊ถŒํ•œ์„ ์—ด์–ด์ค˜์•ผํ•ด์„œ ๊ทธ๋Ÿฐ ๊ฒƒ์ด ์•„๋‹Œ๊ฐ€ ์ถ”์ธกํ•ด๋ณธ๋‹ค.

#110 AWS CloudTrail

  • CloudTrail is enabled by default!

  • ์ฐธ๊ณ 

    • IAM Credential Report : ํ•œ ๊ณ„์ • ๋‚ด๋ถ€์˜ IAM user๋“ค์˜ ์ž๊ฒฉ ์ฆ๋ช…์˜ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌ

    • IAM Access Advisor : last-access๋ฅผ ํŒŒ์•…ํ•ด ๊ถŒํ•œ ๊ด€๋ฆฌ ๊ฐ€๋Šฅ

  • Provides governance(๊ด€๋ฆฌ), compliance(๊ทœ์ • ์ค€์ˆ˜) and audit(๊ฐ์‚ฌ) for your AWS Account

  • Get an history of events / API calls made within your AWS Account by:

    • Console

    • SDK

    • CLI

    • AWS Services

  • Events are stored for 90 days in CloudTrail

    • ์žฅ๊ธฐ ๋ณด๊ด€์„ ํ•  ๊ฒƒ์ด๋ผ๋ฉด s3์— ๋ณด๋‚ด๋ฉด ๋œ๋‹ค.

  • Can put logs from CloudTrail into CloudWatch Logs or S3

  • A trail can be applied to All Regions (default) or a single Region. : ๋ชจ๋“  Region์˜ access๋ฅผ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • If a resource is deleted in AWS, investigate CloudTrail first! : ์ž์›์„ ๋ˆ„๊ฐ€ ์‚ญ์ œํ–ˆ๋Š”์ง€ ๋ณด๊ณ  ์‹ถ๋‹ค๋ฉด cloudtrail์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

  • CloudTrail Events

    • Management Events

      • Operations that are performed on resources in your AWS account : ์˜ˆ๋ฅผ ๋“ค์–ด ec2์— iam role์„ ์„ค์ •ํ•ด์ฃผ๋Š” ๊ฒƒ. ์›ฌ๋งŒํ•œ aws service๋Š” api call๊ฐ€ ํ˜ธํ™˜๋˜๋ฏ€๋กœ, api call์ด ๊ฐ€๋Šฅํ•œ ๋ชจ๋“  ์„œ๋น„์Šค๋Š” cloudtrail๋กœ ์ถ”์ ์ด ๊ฐ€๋Šฅํ•˜๋‹ค๊ณ  ๋ณด๋ฉด ๋œ๋‹ค.

      • Read Eventsd์™€ Write Events๋ฅผ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค.

    • Data Events

      • By default, data events are not logged (because high volume operations) : ๋ฐ์ดํ„ฐ ์ด๋ฒคํŠธ๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์Œ“์ด์ง€ ์•Š๋Š”๋‹ค.

      • ์ด ์˜ต์…˜์„ ํ™œ์„ฑํ™”ํ•˜๋ฉด getObject, putObject ๋“ฑ์˜ s3 event๊ฐ€ ๋ฐœ์ƒํ•  ๋•Œ๋งˆ๋‹ค ๋กœ๊ทธ๋ฅผ ์Œ“์„ ์ˆ˜ ์žˆ๋‹ค.

    • CloudTrail Insights Events

      • CloudTrail Insights : CloudTrail Insights to detect unusual activity in your account > ๊ณ„์ • ๋ ˆ๋ฒจ์—์„œ ๊ณ„์ • ๋‚ด๋ถ€ ์œ ์ €์˜ ๋น„์ •์ƒ์ ์ธ ํ™œ๋™์„ ๊ฐ์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค. ์˜ˆ์‹œ 565p ์ฐธ๊ณ 

      • Continuously analyzes write events to detect unusual patterns : CloudTrail์€ ์ง€์†์ ์œผ๋กœ Management Events๋ฅผ ๋ถ„์„ํ•˜๋ฉด ์ด์ƒ์ด ์—†๋Š”์ง€ ํŒŒ์•…ํ•˜๊ณ  ์ด์ƒ ๊ฐ์ง€ ํ›„ ์ด๋ฒคํŠธ๋ฅผ CloudTrail Console ๋˜๋Š” s3 ๋˜๋Š” eventbridge์— ๋ณด๋‚ธ๋‹ค.

#111 AWS Config

  • Helps with auditing and recording compliance(๊ทœ์ • ์ค€์ˆ˜) of your AWS resources : ๊ทœ์ • ์ค€์ˆ˜๋ผ๊ณ  ํ•จ์€ aws๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ ์ž์‹ ์ด ์ƒ๊ฐํ•œ๋Œ€๋กœ ๊ฐ์ข… ์„œ๋น„์Šค๋“ค์„ ์ž˜ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‚˜ ์ •๋„๋กœ ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค.

  • Helps record configurations and changes over time : ์•„๋ž˜์—์„œ compliance๋ฅผ auditํ•˜๋Š” ์˜ˆ์‹œ๋ฅผ ๋“ค ์ˆ˜ ์žˆ๋‹ค.

    • Is there unrestricted SSH access to my security groups?

    • Do my buckets have any public access?

    • How has my ALB configuration changed over time?

  • You can receive alerts (SNS notifications) for any changes

  • AWS Config is a per-region service

  • Can be aggregated across regions and accounts : CloudTrail, CloudWatch Dashboard์™€ ๋‹ค๋ฅด๊ฒŒ per region ์„œ๋น„์Šค์ด์ง€๋งŒ cross regionํ•˜๊ฒŒ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

  • Possibility of storing the configuration data into S3 (analyzed by Athena) : CloudWatch, CloudTrail๊ณผ ๋™์ผ

#112 AWS Config Rules

  • Managed config rules (over 75)

  • Make custom config rules (must be defined in AWS Lambda)

    • Example: evaluate if each EBS disk is of type gp2

    • Example: evaluate if each EC2 instance is t2.micro

  • Rules can be evaluated / triggered

    • For each config change

    • At regular time intervals : triggered

  • AWS Config Rules does not prevent actions from happening(no deny) : ์˜ˆ์‹œ๋กœ ec2ํƒ€์ž…์„ t2๋กœ aws config๋กœ ์„ค์ •ํ•˜๊ณ  r๊ณ„์—ด์˜ ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜๋„ ์žˆ๋‹ค๋Š” ๋œป.

  • AWS Config Resource

    • View compliance of a resource over time

    • View configuration of a resource over time

    • View CloudTrail API calls of a resource over time : compliance, configuration๋Š” compliance(๊ทœ์ • ์ค€์ˆ˜) check์„ ์œ„ํ•ด์„œ ๋‹น์—ฐํžˆ ๋ณผ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ธ๋ฐ Cloudtrail API calls๊นŒ์ง€ ๋ณผ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ๋„ ์ƒ๊ฐํ•ด์•ผ ํ•œ๋‹ค.

  • Config Rules Remediations : Non-compliant resource์— ๋Œ€ํ•œ ํšŒ๋ณต

    • Non-compliantํ•œ resource์— ๋Œ€ํ•ด ์ž๋™์œผ๋กœ Auto-Remediation Action(SSM Document: AWSConfigRemediationRevokeUnusedIAMUserCredentials)์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.

    • SSM Automation์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ , Custom Automation์„ ์‚ฌ์šฉํ•ด์„œ lambda function์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

    • Remediation์‹คํ–‰ ํ›„์—๋„ ํšŒ๋ณต์ด ์•ˆ๋˜๋ฉด 5๋ฒˆ์„ dafault๋กœ ์‹œ๋„

  • Config Rules Notifications

    • aws config๋Š” eventbridge์— event๋ฅผ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๋‹ค.

    • aws config์—์„œ ๋ฐœ์ƒํ•˜๋Š” ๋ชจ๋“  ์ด๋ฒคํŠธ๋ฅผ eventbridge์— ์ „๋‹ฌํ•˜๊ณ  eventbridge๋Š” sns์— ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ์ด ๊ณผ์ •์—์„œ ํŠน์ • ์ด๋ฒคํŠธ๋งŒ ์›ํ•œ๋‹ค๋ฉด sns filter๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

    • CloudWatch vs CloudTrail vs Config 571p ํ•„ํžˆ ์ฐธ๊ณ .

#113 AWS STS โ€“ Security Token Service

  • Allows to grant limited and temporary access to AWS resources : aws ์ž์›์— ๋Œ€ํ•œ ์ผ์‹œ์  ์ ‘๊ทผ์„ ์›ํ•  ๋•Œ ์‚ฌ์šฉ

  • Token is valid for up to one hour (must be refreshed) : ์ตœ๋Œ€ 1์‹œ๊ฐ„๊นŒ์ง€ ์œ ํšจํ•œ ํ† ํฐ์„ ์‚ฌ์šฉ

  • AssumeRole : ์•„๋ž˜ ๋‘ ๊ฐ€์ง€ ๊ฒฝ์šฐ์— ์‚ฌ์šฉ๋œ๋‹ค.

      1. Within your own account: ๊ฐ•ํ™”๋œ ๋ณด์•ˆ์„ ์œ„ํ•ด์„œ

      1. Cross Account Access: ์˜ˆ๋ฅผ ๋“ค์–ด, development๊ณ„์ •์˜ ์œ ์ €๊ฐ€ ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด์„œ production๊ณ„์ •์˜ ์—ญํ• ์ด ํ•„์š”ํ•œ ๊ฒฝ์šฐ production๊ณ„์ •์„ ์ฃผ๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ๋ฐฐํฌ์— ํ•„์š”ํ•œ role๋งŒ ์ž ๊น sts๋กœ ์ค„ ์ˆ˜ ์žˆ๋‹ค.

    • https://docs.aws.amazon.com/ko_kr/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html ์ฐธ๊ณ 

  • Assume Role ์‚ฌ์šฉ๋ฒ•

      1. Define an IAM Role within your account or cross-account

      1. Define which principals(a person or application that can make a request for an action or operation on an AWS resource) can access this IAM Role : ๋ˆ„๊ฐ€ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์„ค์ •

      1. Use AWS STS (Security Token Service) to retrieve credentials and impersonate(๋ชจ๋ฐฉ) the IAM Role you have access to (AssumeRole API) : 576p ์ฐธ๊ณ 

    • ๊ฐ„๋‹จํ•˜๊ฒŒ ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด development๊ณ„์ •์˜ ์œ ์ €๊ฐ€ production s3 bucket์— ์ ‘๊ทผํ•ด์•ผํ•  ์ผ์ด ์ƒ๊ธด๋‹ค๋ฉด ๋ฏธ๋ฆฌ production s3 bucket์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” IAM Role์„ ๋งŒ๋“ค์–ด๋†“๊ณ , sts token์„ development๊ณ„์ •์— ๋ถ€์—ฌํ•ด์„œ production s3 bucket์— ์ผ์‹œ์ ์œผ๋กœ ์ ‘๊ทผํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

#114 Identity Federation in AWS

  • Federation lets users outside of AWS to assume temporary role for accessing AWS resources. : ์™ธ๋ถ€ ์„œ๋น„์Šค ๋กœ๊ทธ์ธ์œผ๋กœ aws ์ž์›์— ์ง์ ‘ ์ ‘๊ทผํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š”๋ฐ์— ์ตœ์ ํ™”๋˜์–ด ์žˆ๋‹ค.

  • Using federation, you donโ€™t need to create IAM users (user management is outside of AWS) : ์˜ˆ๋ฅผ ๋“ค์–ด ๋ฐฑ๋งŒ๋ช…์˜ ์‚ฌ์šฉ์ž๊ฐ€ aws์ž์›์— ์ ‘๊ทผํ•ด์•ผ ํ•  ๋•Œ ์ผ์ผ์ด ๊ณ„์ •์„ ์ƒ์„ฑํ•ด์ฃผ๊ธฐ๋Š” ์–ด๋ ต๋‹ค.

  • Identity Federation์€ ์™ธ๋ถ€์—์„œ ์–ด๋–ค ์ธ์ฆ ๋ฐฉ๋ฒ•(SAML 2.0, Web Identity Federation, Custom Identity Broker)์„ ์‚ฌ์šฉํ•˜๋“ ์ง€ ๋งค์ปค๋‹ˆ์ฆ˜์€ ๋น„์Šทํ•˜๋‹ค. ์™ธ๋ถ€ ์„œ๋น„์Šค์— ๋กœ๊ทธ์ธํ•˜๊ณ , aws์— ์•ก์„ธ์Šค ์š”์ฒญ ํ›„, sts๋กœ ํ† ํฐ์„ ๋ฐ›์•„ aws์ž์›์— ์ง์ ‘ ์ ‘๊ทผํ•˜๋Š” ๋ฐฉ์‹์ด๋‹ค.

  • SAML2.0(Security Assertion Markup Language, ๋‹ค๋ฅธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ธ์ฆ ํ† ํฐ์„ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ๋กœ๊ทธ์ธ ํ‘œ์ค€)์€ deprecated์ด๊ณ , Amazon Single Sign On (SSO)์„ ๊ถŒ์žฅํ•œ๋‹ค.

  • Custom Identity Broker Application : ์ด๊ฒƒ์€ SAML 2.0์„ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ๊ณณ์— ์‚ฌ์šฉํ•˜๋Š”๋ฐ, identity broker๊ฐ€ sts token์„ ๋ฐ›์•„์˜จ๋‹ค๋Š” ์  ๋นผ๊ณ ๋Š” ๊ธฐ์กด identity federation ๋™์ž‘ ๋ฐฉ์‹๊ณผ ๋น„์Šทํ•˜๋‹ค.(AssumeRole or GetFederationToken API์‚ฌ์šฉ)

    • The identity broker must determine the appropriate IAM policy : The identity broker๊ฐ€ IAM policy๋ฅผ ์ •์˜ํ•œ๋‹ค.(๋‹น์—ฐํ•˜์ง€๋งŒ ์–ด๋–ค ์—ญํ• ์„ ์›ํ•˜๋Š”์ง€ aws์— ๋งํ•ด์ค˜์•ผ ํ•˜๋ฏ€๋กœ)

  • AssumeRoleWithWebIdentity : deprecated์ด๊ณ  Cognito๋กœ ๋Œ€์ฒด ๊ฐ€๋Šฅํ•˜๋‹ค.

  • Federated Identity Pools using Cognito

    • ์ค‘์š”ํ•œ ์„ธ ๊ฐ€์ง€ ๊ณผ์ •๋งŒ ๊ธฐ์–ตํ•˜์ž.

      1. Identity Provider(Cognito User Pool, ํŽ˜์ด์Šค๋ถ ๋กœ๊ทธ์ธ, ๊ตฌ๊ธ€ ๋กœ๊ทธ์ธ, SAML ๋กœ๊ทธ์ธ ๋“ฑ)์— ๋กœ๊ทธ์ธ ํ›„ ํ† ํฐ์„ ๋ฐ›๋Š”๋‹ค.

      1. ํ† ํฐ์„ Cognito Federated Identity์— ๋„˜๊ธด ํ›„ Cognito Federated Identity๋Š” Identity Providerํ† ํฐ์ด ์œ ํšจํ•œ ์ง€ ๊ฒ€์ฆํ•œ๋‹ค.

      1. sts๋กœ temporary credential ๋ฆฌํ„ด

#115 Microsoft Active Directory

  • Overview๋Š” ๊ฐ„๋žตํ•˜๊ฒŒ ์งš๊ณ  ๋„˜์–ด๊ฐ„๋‹ค. AWS Directory Services 3๊ฐ€์ง€๋งŒ ์™ธ์šฐ๊ณ  ๋„˜์–ด๊ฐ€๋ฉด ๋œ๋‹ค.

  • Active Directory helps you organize your company's users, computer and more : Database of objects, ํšŒ์‚ฌ ๋‚ด์˜ ์œ ์ € ๊ณ„์ •, ์ปดํ“จํ„ฐ, ํ”„๋ฆฐํ„ฐ ๋“ฑ์„ ๋ฐ์ดํ„ฐ๋กœ ์ €์žฅ

  • Centralized security๋กœ domain controller์—์„œ ๋ชจ๋“  ๊ถŒํ•œ์„ ๊ฐ€์ง€๊ณ  ํ•˜์œ„ ์˜ค๋ธŒ์ ํŠธ๋“ค์„ ๊ด€๋ฆฌํ•œ๋‹ค.

  • Lightweight Directory Access Protocol(LDAP) ์‚ฌ์šฉ : TCP/IP ์œ„์—์„œ ๋””๋ ‰ํ„ฐ๋ฆฌ ์„œ๋น„์Šค๋ฅผ ์กฐํšŒํ•˜๊ณ  ์ˆ˜์ •ํ•˜๋Š” ์‘์šฉ ํ”„๋กœํ† ์ฝœ

  • AWS Directory Services

    • AWS Managed Microsoft AD

      • on-premise AD ์‚ฌ์šฉ

      • MFA ์ง€์›

      • Establish โ€œtrustโ€ connections with your on-premise AD

    • AD Connector

      • on-premise AD ์‚ฌ์šฉ

      • ํ”„๋ก์‹œ ์‚ฌ์šฉ

    • Simple AD

      • on-premise AD๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์„ ๋•Œ ์‚ฌ์šฉ

      • ec2 instance์‚ฌ์šฉ๊ฐ€๋Šฅ

#116 AWS Organizations

  • Global service

  • Allows to manage multiple AWS accounts : 1๊ฐœ์˜ master account์™€ ์ˆ˜ ๋งŽ์€ member account๋กœ ์ด๋ฃจ์–ด์ง„๋‹ค.

  • ํ•œ member account๋Š” ํ•œ organization์—๋งŒ ์†ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • API is available to automate AWS account creation

  • Multi Account Strategies : aws organization์„ ํ™œ์šฉํ•  ๋‹ค์–‘ํ•œ ๋ฐฉ๋ฒ•์ด ์กด์žฌํ•œ๋‹ค.

    • Create accounts per department,

    • per cost center, per dev / test / prod, based on regulatory restrictions (using SCP : Security Control Policy)

    • for better resource isolation (ex: VPC), to have separate per-account service limits, isolated account for logging

  • Organizational Units(OU) : OU๋Š” ํ•˜๋‚˜์˜ ๊ทธ๋ฃน์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ๋œ๋‹ค. OU์•ˆ์— ๊ทธ๋ฃน์„ ๋งŒ๋“ค๋ฉด ๊ทธ๋ฃน ์•ˆ์˜ ๊ณ„์ •๋“ค์„ OU์˜ ์†์„ฑ์„ ๊ณต์œ ํ•œ๋‹ค.

  • Security Control Policy : Whitelist or blacklist IAM actions - allowํ•˜๊ฑฐ๋‚˜ deny

    • Applied at the OU or Account level : OU(์‚ฌ์‹ค์ƒ Account๋ฅผ ๋ฌถ์€ ๊ทธ๋ฃน์— ๊ฐ€๊นŒ์›€)์™€ account๋ชจ๋‘์— ์ ์šฉ๊ฐ€๋Šฅํ•˜๊ณ  ๊ฐœ๋ณ„ ๊ถŒํ•œ ํ•„์š”ํ•œ ๊ฒฝ์šฐ account์— ์ ์šฉ

    • Does not apply to the Master Account : master account์—๋Š” scp๋ฅผ ์ ์šฉํ•ด๋„ ์ ์šฉ๋˜์ง€ ์•Š๋Š”๋‹ค.

    • SCP is applied to all the Users and Roles of the Account, including Root user : ๊ณ„์ •์—์„œ iam user๋ฅผ ๋งŒ๋“ค๋“  ๋ฃจํŠธ ๊ณ„์ •์„ ์‚ฌ์šฉํ•˜๋“  ์ƒ๊ด€ ์—†์ด scp๋Š” ํ•œ ๊ณ„์ •์— ์ ์šฉํ•˜๋ฉด ๊ทธ ๊ณ„์ •์— ์ „์—ญ์ ์œผ๋กœ ์ ์šฉ๋œ๋‹ค.

    • ๊ธฐ๋ณธ์ ์œผ๋กœ deny๊ฐ€ default๋กœ ์ ์šฉ๋˜๊ณ  deny, allow๊ฐ€ ๊ณต์กดํ•˜๋Š” ๊ฒฝ์šฐ deny๋ฅผ ์šฐ์„ ์ ์šฉํ•œ๋‹ค.

  • Moving Accounts

    • ํ•œ ์กฐ์ง์€ ๋ฉค๋ฒ„๋ฅผ ๋‹ค๋ฅธ ์กฐ์ง์œผ๋กœ ์˜ฎ๊ธฐ๋ ค๋ฉด ์กฐ์ง์—์„œ ๋ฉค๋ฒ„๋ฅผ ์‚ญ์ œํ•ด์•ผ ๊ฐ€๋Šฅ

    • ํ•œ ์กฐ์ง์˜ master account๋ฅผ ๋‹ค๋ฅธ ์กฐ์ง์œผ๋กœ ์˜ฎ๊ธฐ๋Š” ๊ฒƒ ์—ญ์‹œ ์œ„์™€ ๊ฐ™์ด ๊ธฐ์กด ์กฐ์ง์—์„œ ์™„์ „ํžˆ ๋ฒ—์–ด๋‚˜์•ผ ๊ฐ€๋Šฅ

#117 IAM Roles vs Resource Based Policies

  • When you assume a role (user, application or service), you give up your original permissions and take the permissions assigned to the role : assume role์€ ์ž์‹ ์˜ ๊ถŒํ•œ์„ ํฌ๊ธฐํ•˜๊ณ  ๋‹ค๋ฅธ ์‚ฌ๋žŒ์—๊ฒŒ ๋„˜๊ธฐ๋Š” ๊ฒƒ

  • When using a resource based policy, the principal doesnโ€™t have to give up his permissions : ์ž์‹ ์˜ ๊ถŒํ•œ์„ ํฌ๊ธฐ ์•ˆํ•ด๋„ ๋จ

#118 IAM Permission Boundaries

  • IAM Permission Boundaries are supported for users and roles (not groups)

  • Advanced feature to use a managed policy to set the maximum permissions an IAM entity can get : IAM ์—”ํ‹ฐํ‹ฐ(์œ ์ € ํ˜น์€ role)๊ฐ€ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์˜ ์ตœ๋Œ€์น˜๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • ์˜ˆ๋ฅผ ๋“ค์–ด administrator๊ถŒํ•œ์„ ๋ถ€์—ฌํ•ด๋„ Permission Boundary๊ฐ€ s3ํ•œ์ •์ด๋ฉด s3์— ํ•œ์ •๋œ ๊ถŒํ•œ์„ ๊ฐ–๊ฒŒ ๋œ๋‹ค.

#119 Organization SCP & Permissions Boundary & Identity-based policy

  • Organization SCP & Permissions Boundary & Identity-based policy 3๊ฐ€์ง€๋ฅผ ๋™์‹œ์— ํ™œ์šฉํ•ด์„œ ๋ณด์•ˆ ๊ฐ•ํ™” ๊ฐ€๋Šฅ

  • Identity-based policy : ์–ด๋–ค identity๋ฅผ ๊ฐ€์ง„ ๊ณ„์ • ํ˜น์€ role์— ๋ถ€์—ฌํ•˜๋Š”, identity๋ฅผ ๋Œ€์ƒ์œผ๋กœ ๊ถŒํ•œ์„ ๋ถ€์—ฌํ•˜๋Š” policy

  • Resource-based policy : ๋ฆฌ์†Œ์Šค์— ๋ถ€์—ฌํ•˜๋Š”, ๋ฆฌ์†Œ์Šค๋ฅผ ๋Œ€์ƒ์œผ๋กœ ํŠน์ • identity๋งŒ ํ—ˆ์šฉํ•˜๊ฒ ๋‹ค๋Š” policy

  • https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html : ๊ณต์‹ ๋ฌธ์„œ ์ฐธ๊ณ 

#120 IAM Policy Evaluation Logic

    1. Deny Evaluation : ๋ฌด์–ธ๊ฐ€๋ฅผ denyํ•˜๋Š” effect๊ฐ€ ์žˆ๋‹ค? ๊ทธ๋ ‡๋‹ค๋ฉด ๋ฌด์กฐ๊ฑด allow๋ณด๋‹ค ์šฐ์„ ์ ์šฉ๋˜์–ด ๋ฌด์กฐ๊ฑด deny๋œ๋‹ค.

    1. Organization SCP

    1. Resource-based policies

    1. IAM permissions boundaries

    1. Session policies

    1. Identity-based policies\

#121 AWS Resource Access Manager(RAM)

  • Share AWS resources that you own with other AWS accounts : ํ•œ aws๊ณ„์ •์ด ๊ฐ€์ง„ ๋ฆฌ์†Œ์Šค๋ฅผ ๋‹ค๋ฅธ aws๊ณ„์ •๊ณผ ์‰์–ดํ•œ๋‹ค.

  • Avoid resource duplication : ๋ฆฌ์†Œ์Šค ๋ณต์ œ๊ฐ€ ์•„๋‹ˆ๋ผ ๊ณต์œ ๋ฅผ ์ง€ํ–ฅํ•œ๋‹ค.

  • VPC Subnets์˜ ๊ฒฝ์šฐ RAM์ด ์ž์ฃผ ์‚ฌ์šฉ๋˜๋ฏ€๋กœ ์ด ์ผ€์ด์Šค๋Š” ๊ผญ ๊ธฐ์–ตํ•˜๋„๋ก ํ•˜์ž.

  • ๋‹ค์ด์–ด๊ทธ๋žจ 604p๋ฅผ ์ฐธ๊ณ ํ•˜๋ฉด private subnet๋‚ด์—์„œ private ip๋กœ ๋ฆฌ์†Œ์Šค๊ฐ„ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•ด ๋ณด์•ˆ ๊ทธ๋ฃน๋ผ๋ฆฌ๋งŒ ์ž˜ ์„ค์ •ํ•ด์ฃผ๋ฉด ๋‹ค๋ฅธ ๊ณ„์ •์— ์žˆ๋Š” ์„œ๋กœ ๋‹ค๋ฅธ ๋ฆฌ์†Œ์Šค ๊ฐ„์— ์ ‘๊ทผ์ด ์‰ฝ๊ฒŒ ๊ฐ€๋Šฅํ•˜๋‹ค.

#122 AWS Single Sign-On (SSO)

  • Centrally manage Single Sign-On to access multiple accounts and 3rd-party business applications. : On-premise์„œ๋ฒ„ ํ˜น์€ Identity Store SAML 2.0 Compatible๊ณผ ์—ฐ๋™ํ•˜์—ฌ sso์— ๋กœ๊ทธ์ธํ•˜๋ฉด aws console, business cloud application(slack, dropbox), custom SAML application ๋ชจ๋‘๋ฅผ ํ•œ ๋กœ๊ทธ์ธ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ง ๊ทธ๋Œ€๋กœ Single Sign On์ด๋‹ค.

  • Integrated with AWS Organizations

  • Supports SAML 2.0 markup

  • Integration with on-premise Active Directory

  • Centralized permission management

  • 607p ์ฐธ๊ณ 

#123 SSO vs AssumeRoleWithSAML

  • AssumeRoleWithSAML๋Š” 3rd party์•ฑ์— ๋กœ๊ทธ์ธํ•˜๊ณ  sts์— credential์š”์ฒญ ํ›„ ํ† ํฐ์„ ๋ฐ›์•„ aws resource์— ์ ‘๊ทผํ•œ๋‹ค.

  • ๋ฐ˜๋ฉด SSO๋Š” SSO Login Portal(Identity Store SAML 2.0 Compatible๊ณผ ์—ฐ๋™๋œ)์—๋งŒ ๋กœ๊ทธ์ธํ•˜๋ฉด credentail์„ ๋ฐ›์•„ aws resource์— ๋ฐ”๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๊ณ  aws์—์„œ AssumeRoleWithSAML์— ๋น„ํ•ด์„œ ๊ถŒ์žฅํ•˜๋Š” ๋ฐฉ์‹์ด๋‹ค.

#124 AWS KMS(Key Management Service)

  • Fully integrated with IAM for authorization

  • server side encryption์— ํšจ๊ณผ์ 

  • Symmetric(AES-256 keys)

    • Necessary for envelope encryption : envelope encryption์ด๋ž€ ํ•œ ํ‚ค๋กœ ์•”ํ˜ธํ™”ํ•œ ๊ฒƒ์„ ๋‹ค๋ฅธ ํ‚ค๋กœ ํ•œ ๋ฒˆ ๋” ์•”ํ˜ธํ™”ํ•˜๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค. (envelope encryption์€ developer exam๋ฒ”์œ„์ด๊ณ  solutions architect๋ฒ”์œ„๋Š” ์•„๋‹ˆ๋‹ค.)

    • You never get access to the Key unencrypted (must call KMS API to use)

  • Asymmetric(RSA & ECC key pairs)

    • The public key is downloadable, but you canโ€™t access the Private Key unencrypted

    • Use case: Sign/Verify operations, encryption outside of AWS by users who canโ€™t call the KMS API : public key๊ฐ€ downloadable์ด๋ฏ€๋กœ KMS API๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” ์ƒํ™ฉ์ด๋ผ๋ฉด ๊ณ ๋ ค ๊ฐ€๋Šฅ

  • Symmetric key์™€ Asymmetric์˜ private key๋Š” ๊ณตํ†ต์ ์œผ๋กœ unencrypted์ƒํƒœ๋กœ ๋ณผ ์ˆ˜ ์—†๊ฒŒ ์„ค๊ณ„๋˜์—ˆ๋‹ค.

  • Three types of Customer Master Keys(CMK) : KMS์™€ ๋™์˜์–ด์ด๊ณ  KMS๊ฐ€ ์ตœ์‹  ๋ฒ„์ „

    • AWS Managed Service Default CMK: free > ์˜ˆ๋ฅผ ๋“ค์–ด EBS์‚ฌ์šฉํ•  ๋•Œ at rest encryption์œผ๋กœ default kms๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด ์š”๊ธˆ์ด free๋ผ๋Š” ๊ฒƒ์ด๋‹ค.

    • ๋‚˜๋จธ์ง€๋Š” ์ปค์Šคํ…€ํ‚ค๋ฅผ ์ƒ์„ฑํ•˜๊ฑฐ๋‚˜ importํ•˜๋Š” ๊ฒƒ์ธ๋ฐ ๊ฐœ๋‹น $1/month์ด๋‹ค.

  • aws์—์„œ ๊ด€๋ฆฌํ•˜๋Š” KMS๋‚ด๋ถ€์˜ ํ‚ค๋Š” ๋ณผ ์ˆ˜ ์—†๋‹ค. ๋”ฐ๋ผ์„œ ๋ชจ๋“  ๋ณด์•ˆ์€ aws์—์„œ ๋งก๊ธฐ๋Š” ๊ฒƒ์ด๊ณ , rotate key๋กœ ๋ณด์•ˆ์„ ๊ฐ•ํ™”ํ•  ์ˆ˜ ์žˆ๋‹ค.

  • KMS can only help in encrypting up to 4KB of data per call

  • If data > 4 KB, use envelope encryption : KMS์—์„œ 4KB์ด์ƒ์˜ ๋ฐ์ดํ„ฐ๋Š” envelope encryption์„ ์‚ฌ์šฉํ•œ๋‹ค.

  • To give access to KMS to someone : IAM Policy๋ฟ๋งŒ ์•„๋‹ˆ๋ผ Key Policy๋„ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์„ ๊ธฐ์–ตํ•˜์ž.

    • Make sure the Key Policy allows the user : Key policy ์„ค์ • ํ•„์š”

    • Make sure the IAM Policy allows the API calls : IAM Policy ์„ค์ • ํ•„์š”

#125 KMS Key Policies

  • Control access to KMS keys, โ€œsimilarโ€ to S3 bucket policies : s3 bucket policy์ฒ˜๋Ÿผ ์ ‘๊ทผ์„ ์ œํ•œํ•˜๋Š” policy๋ฅผ ๋งํ•œ๋‹ค.

  • Default KMS Key Policy

    • policy๋ฅผ ๋”ฐ๋กœ ์„ค์ •ํ•˜์ง€ ์•Š์•˜์„ ๊ฒฝ์šฐ ์ ์šฉ๋˜๋Š” policy

    • Complete access to the key to the root user = entire AWS account : ๋ฃจํŠธ ์œ ์ €๋ฅผ ํฌํ•จํ•œ IAM์˜ ๋ชจ๋“  ๊ณ„์ •์ด ์ด ํ‚ค์— ์ ‘๊ทผ ๊ฐ€๋Šฅ

    • ๋”ฐ๋ผ์„œ ์ด ๊ฒฝ์šฐ๋Š” IAM policy๋งŒ ์ž˜ ์„ค์ •ํ•ด์ฃผ๋ฉด Key Policy๊ฐ€ default๋กœ ์ ์šฉ๋˜๋Š” ๊ฒƒ์ด๋‹ค.

  • Custom KMS Key Policy

    • ์ปค์Šคํ…€์œผ๋กœ ์–ด๋–ค user, role์ด ์ด ํ‚ค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ์ •์˜ํ•œ๋‹ค. ๋‹น์—ฐํžˆ policy์— ๋”ฐ๋ผ์„œ ๋‹ค๋ฅธ ๊ณ„์ •๋„ ์ด ํ‚ค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋‹ค.

#126 KMS Automatic Key Rotation

  • For Customer-managed CMK(not AWS managed CMK) : AWS Managed Key๋Š” 3๋…„๋งˆ๋‹ค rotate๋œ๋‹ค๊ณ  ํ•œ๋‹ค. Customer Managed Key๋Š” AWS Managed Key๋ณด๋‹ค ๋ณด์•ˆ์ด ์ทจ์•ฝํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํŒ๋‹จํ•œ ๊ฒƒ ๊ฐ™๋‹ค.

  • If enabled: automatic key rotation happens every 1 year

  • Previous key is kept active so you can decrypt old data : ์ด์ „ ํ‚ค๋Š” ์ด์ „ ๋ฐ์ดํ„ฐ๋“ค์„ ์œ„ํ•ด์„œ ์ ˆ๋Œ€ ์‚ญ์ œ๋˜๋ฉด ์•ˆ๋œ๋‹ค.

  • New Key has the same CMK ID (only the backing key is changed)

  • Automatic Key Rotation์ด ๋ฐœ์ƒํ•˜๋ฉด CMK ID๋Š” ๋ณ€๊ฒฝ๋˜์ง€ ์•Š๊ณ  ๋‚ด๋ถ€์˜ (Backing Key)์‹ค์ œ ํ‚ค ๊ฐ’๋งŒ ๋ณ€๊ฒฝ๋œ๋‹ค. ๋ฌผ๋ก  Old Backing Key๋„ save๋œ๋‹ค.

  • Managed Key Rotation์€ CMK ID๋ฅผ ๋ณ€๊ฒฝํ•œ๋‹ค.

#127 KMS Manual Key Rotation

  • 90์ผ, 180์ผ ๋“ฑ์˜ ๊ฐ„๊ฒฉ์œผ๋กœ key๋ฅผ rotateํ•  ์ˆ˜ ์žˆ๋‹ค.

  • New Key has a different CMK ID : ๋‹น์—ฐํžˆ backing key๋„ ๋ฐ”๋€๋‹ค. alias๋งŒ ์œ ์ง€ ๊ฐ€๋Šฅ

  • Better to use aliases in this case (to hide the change of key for the application) : new key๋ฅผ ์ƒ์„ฑํ•ด๋„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ api๋ณ€๊ฒฝ ์—†์ด ์‚ฌ์šฉ๊ฐ€๋Šฅํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ๊ฒƒ์ด alias์ด๋‹ค.

  • Good solution to rotate CMK that are not eligible for automatic rotation (like asymmetric CMK) : ๋น„๋Œ€์นญํ‚ค๋Š” automatic rotation์„ ์ง€์›ํ•˜์ง€ ์•Š๋Š”๋‹ค. ๊ฐœ์ธ์ ์ธ ์˜๊ฒฌ์œผ๋กœ๋Š” ๋น„๋Œ€์นญํ‚ค๋Š” public, private key 2๊ฐœ๊ฐ€ ์กด์žฌํ•ด์„œ ์ž๋™ ๊ด€๋ฆฌ๊ฐ€ ์ข€ ๋ถ€๋‹ด์Šค๋Ÿฌ์šด ๊ฒƒ ๊ฐ™๋‹ค.

#128 SSM Parameter Store

  • Secure storage for configuration and secrets : ์„ค์ •์— ํ•„์š”ํ•œ ์—ฌ๋Ÿฌ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋“ค์„ ์ €์žฅํ•˜๊ธฐ์— ์ข‹์€ ์„œ๋น„์Šค

  • Serverless, scalable, durable, easy SDK

  • Version tracking of configurations / secrets : ๋ฒ„์ €๋‹ ์ง€์›

  • Notifications with CloudWatch Events : ์‹œํฌ๋ฆฟ์— ๋งŒ๋ฃŒ ๊ธฐํ•œ์„ ์„ค์ •ํ•˜๋ฉด ๋‚˜์ค‘์— ๋งŒ๋ฃŒ ๋ฉฐ์น  ์ „์ธ์ง€ event๋ฅผ ๋ฐœ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

  • SSM Parameter Store Hierarchy

    • /my-department/my-app/dev/db-url : GetParameters๋กœ ์ด ๊ฒฝ๋กœ์— ์ €์žฅ๋œ ํ‚ค๋ฅผ ๋ฐ›์•„์˜ค๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅ

    • /my-department/my-app/dev/amzn2-ami-hvm-x86_64-gp2 : GetParametersByPath๋กœ PATH์ž์ฒด๋ฅผ ๋ฐ›์•„์˜ค๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅ

#129 AWS Secrets Manager

  • Newer service, meant for storing secrets : ์‹œํฌ๋ฆฟ ํ‚ค ์ €์žฅ์— ํŠนํ™”๋œ Secrets Manager

  • Capability to force rotation of secrets every X days : rotation์„ x-day๋งˆ๋‹ค ๋Œ๋ฆด ์ˆ˜ ์žˆ๋‹ค.

  • Integration with Amazon RDS (MySQL, PostgreSQL, Aurora) : RDS, redshift, documentdb ๋“ฑ์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ๊ถŒ์žฅ๋˜๋Š” ์กฐํ•ฉ์ด๋‹ค.

  • ๊ทธ๋ƒฅ AWS Secrets Manager ์ƒ์„ฑ ์‹œ ์œ ์ € ์ด๋ฆ„, ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ๊ณ ๋ฅด๋ฉด ํ‚ค ๊ด€๋ฆฌ + ํ‚ค rotation์„ ์•Œ์•„์„œ ํ•ด์ค€๋‹ค๊ณ  ๋ณด๋ฉด ๋œ๋‹ค.

#130 AWS Shield

  • AWS Shield Standard

    • Free service : ๊ธฐ๋ณธ์œผ๋กœ ์„ธํŒ…๋˜๋ฉด ๋ฌด๋ฃŒ

    • Provides protection from attacks such as SYN/UDP Floods, Reflection attacks and other layer 3/layer 4 attacks

    • ์ฐธ๊ณ ๋กœ SYN/UDP Floods, Reflection attacks์ด ๋ฌด์—‡์ธ์ง€๋Š” ์„ค๋ช…ํ•˜์ง€ ์•Š์•˜๋‹ค. ์ถœ์ œ๋ฒ”์œ„๊ฐ€ ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

  • AWS Shield Advanced

    • $3,000 per month per organization๋กœ ๊ต‰์žฅํžˆ ๋น„์‹ธ๋‹ค.

    • DDoS ๋ฐฉ์–ด

    • Protect against higher fees during usage spikes due to DDoS : ๋””๋„์Šค๋กœ ์ธํ•ด ํŠธ๋ž˜ํ”ฝ์ด ๊ธ‰๊ฒฉํžˆ ๋Š˜์–ด๋‚˜๋„ ์š”๊ธˆ์ด ๋Š˜์–ด๋‚˜์ง€ ์•Š๋Š”๋‹ค.

#131 CloudHSM

  • KMS => AWS manages the software for encryption : KMS๊ฐ€ ์†Œํ”„ํŠธ์›จ์–ด ์ธก๋ฉด์—์„œ, aws๊ฐ€ ์ง์ ‘ ํ‚ค๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค๋ฉด

  • CloudHSM => AWS provisions encryption hardware : CloudHSM๋Š” ํ•˜๋“œ์›จ์–ด๋งŒ ์ œ๊ณตํ•˜๊ณ , ์œ ์ €๊ฐ€ ์ง์ ‘ ํ‚ค๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค.

  • Dedicated Hardware : ์ „์šฉ ํ•˜๋“œ์›จ์–ด

  • Supports both symmetric and asymmetric encryption (SSL/TLS keys)

  • No free tier available

  • Must use the CloudHSM Client Software

  • Good option to use with SSE-C(๊ณ ๊ฐ ์ œ๊ณต ์•”ํ˜ธํ™” ํ‚ค) encryption

  • CloudHSM Software๊ฐ€ key์™€ user๋ฅผ manageํ•œ๋‹ค. ํ˜„์žฌ ๊ณต๋ถ€ํ•œ ๋ฐ”๋กœ๋Š” KMS์™€์˜ ์ฐจ์ด์ ์€ KMS๋Š” ํ‚ค ๋กœํ…Œ์ด์…˜์„ AWS์—์„œ ํ•ด์ฃผ์ง€๋งŒ CloudHSM์—์„œ๋Š” ์œ ์ €๊ฐ€ ์ง์ ‘ ํ•ด์•ผ ๋œ๋‹ค ์ด ์ •๋„ ๊ฐ™๋‹ค.

  • CloudHSM โ€“ High Availability

    • Multi AZ

    • ๋„ˆ๋ฌด๋‚˜ ๋‹น์—ฐํ•˜๊ฒŒ๋„ ์ด๋ ‡๊ฒŒ ์ค‘์š”ํ•œ ๋ณด์•ˆํ‚ค๋Š” Highly availableํ•ด์•ผ ํ•˜๊ณ  High durability๋ฅผ ๊ฐ€์ ธ์•ผ ํ•˜๊ณ , ์—ญ์‹œ ๊ทธ๋Ÿฐ ํŠน์„ฑ์„ ์ง€๋‹ˆ๊ณ  ์žˆ๋‹ค.

  • CloudHSM vs KMS : 631p ํ•„ํžˆ ์ฐธ๊ณ .

#132 AWS WAF โ€“ Web Application Firewall

  • Protects your web applications from common web exploits(์›น ์ทจ์•ฝ์  ๊ณต๊ฒฉ - ์›น ์„ค๊ณ„ ์ทจ์•ฝ์  ๋“ฑ)

  • Layer 7(HTTP) ์—์„œ ์ž‘๋™

  • Application Load Balancer, API Gateway, CloudFront : Layer 7์—์„œ ์ž‘๋™ํ•˜๋ฏ€๋กœ ์ด ์„ธ๊ฐ€์ง€์—๋งŒ ์ ์šฉ๋œ๋‹ค. ํ•„ํžˆ ๊ธฐ์–ต.

  • Web Access Control List : ์–ด๋–ค ์š”์ฒญ์„ ๋ง‰์„ ๊ฒƒ์ธ์ง€ rule์„ ์„ค์ •ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์•„๋ž˜๋Š” rule์„ ์„ค์ •ํ•ด์„œ ๋ง‰์„ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ๋“ค์ด๋‹ค.

    • Rules can include: IP addresses, HTTP headers, HTTP body, or URI strings

    • Protects from common attack - SQL injection and Cross-Site Scripting(XSS)

    • geo-match(block countries)

    • Rate-based rules (to count occurrences of events) โ€“ for DDoS protection

  • AWS Firewall Manager

    • Manage rules in all accounts of an AWS Organization : ํ•œ organization์˜ waf rule, shield advanced, security group for ec2 & eni๋“ฑ์„ ๊ด€๋ฆฌํ•œ๋‹ค.

#133 Amazon GuardDuty

  • Intelligent Threat discovery to Protect AWS Account : ๋จธ์‹ ๋Ÿฌ๋‹์„ ์‚ฌ์šฉํ•˜๋Š” ์„œ๋น„์Šค๋กœ, ๊ณ„์ • ๋‚ด์˜ ์ด์ƒ ์ง•ํ›„๋ฅผ ๊ฐ์ง€ํ•œ๋‹ค.

  • GuardDuty๋กœ์˜ ์ธํ’‹์ด ๊ฐ€๋Šฅํ•œ ๊ฒƒ๋“ค > ๋ณดํ†ต ๋น„์ •์ƒ์ ์ธ ๊ฒƒ์„ ๊ฐ์ง€ํ•œ๋‹ค๊ณ  ๋ณด๋ฉด ๋œ๋‹ค.

    • CloudTrail Logs: unusual API calls, unauthorized deployments

    • VPC Flow Logs: unusual internal traffic, unusual IP address

    • DNS Logs: compromised(์œ„ํ˜‘์ด ๋˜๋Š”) EC2 instances sending encoded data within DNS queries

  • ๋‹น์—ฐํžˆ CloudWatch Event๋กœ ์ด๋ฒคํŠธ๋ฅผ ๋ฐœ์ƒ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

  • Can protect against CryptoCurrency attacks(has a dedicated(์ „์šฉ) โ€œfindingโ€ for it) : ์•”ํ˜ธํ™”ํ ๊ณต๊ฒฉ ๋ฐฉ์–ด์— ํŠนํ™”๋˜์–ด ์žˆ๋‹ค.

#134 Amazon Inspector

  • Automated Security Assessments for EC2 instances : ์˜ค์งEC2๋ฅผ ์œ„ํ•œ ๋ณด์•ˆ ํ‰๊ฐ€ ์ž๋™ํ™”

  • OS์œ„์— Inspector Agent๋ฅผ ์„ค์น˜ํ•ด์„œ ๋ณด์•ˆ ์ทจ์•ฝ์ ์„ ํ‰๊ฐ€๋ฐ›์„ ์ˆ˜ ์žˆ๊ณ , ๋ถ„์„์ด ๋๋‚˜๋ฉด report๋ฅผ ๋ฐ›์•„๋ณผ ์ˆ˜ ์žˆ๋‹ค.

  • Analyze against unintended network accessibility, the running OS against known vulnerabilities : ์˜๋„ํ•˜์ง€ ์•Š์€ ๋„คํŠธ์›Œํฌ ์•ก์„ธ์Šค, OS๋ณด์•ˆ ์ทจ์•ฝ์  ๋ถ„์„

  • For Network assessments(agentless)

    • Network Reachability : ๋„คํŠธ์›Œํฌ ๋„๋‹ฌ๊ฐ€๋Šฅ์„ฑ

  • For Host assessments(with agent)

    • Common Vulnerabilities and Exposures : ๋ณดํŽธ์ ์ธ ๋ณด์•ˆ์ทจ์•ฝ์  ํŒŒ์•…

    • Center for Internet Security (CIS) Benchmarks(์„ฑ๋Šฅ ์ธก์ •์„ ๋ชฉ์ ์œผ๋กœ ํ‘œ์ค€์ ์ธ ํ…Œ์ŠคํŠธ ์‹คํ–‰)

#135 Amazon Macie

  • Amazon Macie is a fully managed data security and data privacy service that uses machine learning and pattern matching to discover and protect your sensitive data(PII : Personally identifiable information) in AWS : s3 bucket์„ ๋ถ„์„ํ•ด์„œ sensitiveํ•œ data๊ฐ€ ์กด์žฌํ•œ๋‹ค๋ฉด notify๊ฐ€๋Šฅ

#136 AWS Shared Responsibility Model

  • AWS responsibility - Security of the Cloud

    • Protecting infrastructure(hardware, software, facilities, and networking) that runs all the AWS service : aws ์„œ๋น„์Šค์˜ ๊ธฐ๋ฐ˜ ๊ด€๋ฆฌ๋Š” ๋‹น์—ฐํžˆ aws์˜ ์ฑ…์ž„์ด๋‹ค. ํ•˜๋“œ์›จ์–ด๋Š” ๋ฌผ๋ก ์ด๊ณ , ์†Œ๋น„์ž๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” software์— ์ด์ƒ์ด ์ƒ๊ธฐ๋ฉด ์•ˆ๋œ๋‹ค. ์†Œํ”„ํŠธ์›จ์–ด๋ผ ํ•จ์€ ๋ฐ”๋กœ ์œ„์—์„œ ์‚ดํŽด๋ณธ macie๋ฅผ ์˜ˆ๋กœ ๋“ค๋ฉด, ๋จธ์‹  ๋Ÿฌ๋‹์„ ํ†ตํ•ด์„œ sensitive data๋ฅผ ํŒŒ์•…ํ•˜๋Š”๋ฐ sensitiveeํ•˜์ง€ ์•Š์€ data๋ฅผ sensitiveํ•˜๋‹ค๊ณ  ํŒ๋‹จํ•˜๋ฉด ์•ˆ๋  ๊ฒƒ์ด๋ฏ€๋กœ ์งˆ์ ์ธ ์ธก๋ฉด์—์„œ aws๋Š” ๊ธฐ์ˆ ์˜ ๋ฐœ์ „์— ํž˜์จ์•ผ ํ•œ๋‹ค.

  • Customer responsibility - Security in the Cloud

    • For EC2 instance, customer is responsible for management of the guest OS (including security patches and updates), firewall & networkconfiguration, IAM : EC2์˜ ๋ณด์•ˆ์€ ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ๊ด€๋ฆฌํ•œ๋‹ค.

    • Encrypting application data : ์—ญ์‹œ encryptํ•  ๊ฒƒ์ธ์ง€ ๋ง ์ง€๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๊ด€๋ฆฌํ•œ๋‹ค. aws๋Š” ๋‹จ์ˆœํžˆ ์„œ๋น„์Šค๋งŒ ์ œ๊ณตํ•ด์ค€๋‹ค.

  • Shared controls : aws์™€ customer๊ฐ€ ๊ณต์œ ํ•˜๋Š” ์ฑ…์ž„

    • Patch Management(๋ฒ„์ „ ํŒจ์น˜), Configuration Management(์„ค์ • ๊ด€๋ฆฌ), Awareness & Training

  • 645p ๋„ํ˜• ์ฐธ๊ณ .

#137 VPC(Virtual Private Cloud)

  • CIDR(Classless Inter-Domain Routing) โ€“ IPv4

    • ์‚ฌ์ด๋”๋ผ๊ณ  ๋ถ€๋ฅด๋Š” ์ตœ์‹ ์˜ IP ์ฃผ์†Œ ํ• ๋‹น ๋ฐฉ๋ฒ•.

    • ๊ธฐ์กด IP ์ฃผ์†Œ ํ• ๋‹น ๋ฐฉ๋ฒ•์ธ ๋„คํŠธ์›Œํฌ ํด๋ž˜์Šค๋ฅผ ๋Œ€์ฒดํ–ˆ๋‹ค.

    • ๋ณด์•ˆ ๊ทธ๋ฃน ๋ฃฐ์—์„œ ์‚ฌ์šฉํ•˜๋˜ ip๊ฐ€ ๋ฐ”๋กœ ์ด CIDR์ด๋‹ค.

    • ๊ธฐ์กด A,B,C,D,Eํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋˜ ๊ฒƒ์— ๋น„ํ•ด ์‚ฌ์ด๋”๋Š” ์œ ์—ฐ์„ฑ์„ ๋”ํ•ด์ค€๋‹ค.

    • classful addressing vs CIDR(์™œ CIDR์ด classful์— ๋น„ํ•ด์„œ ์ข‹์€๊ฐ€) : https://www.practicalnetworking.net/stand-alone/classful-cidr-flsm-vlsm/

  • Private IP(์‚ฌ์„ค IP) can only allow certain values : ์‚ฌ์„ค IP๋Š” ํŠน์ • ๊ฐ’๋งŒ ํ• ๋‹นํ•˜๋„๋ก IANA๊ฐ€ ์ •ํ•œ ๊ทœ์น™์ด ์กด์žฌํ•œ๋‹ค.

    • 10.0.0.0 โ€“ 10.255.255.255 (10.0.0.0/8) > in big networks

    • 172.16.0.0 โ€“ 172.31.255.255 (172.16.0.0/12) > AWS default VPC in that range

    • 192.168.0.0 โ€“ 192.168.255.255 (192.168.0.0/16) > home networks

    • ์„œ๋ธŒ๋„ท ๋งˆ์Šคํฌ์˜ ๋ฒ”์œ„๋Š” ์–ธ์ œ๋“ ์ง€ ๋ฐ”๋€” ์ˆ˜ ์žˆ๋‹ค.

    • ์œ„ 3๊ฐ€์ง€๋ฅผ ์ œ์™ธํ•œ ๋‚˜๋จธ์ง€๋Š” ์ „๋ถ€ ๊ณต์ธ IP(Public IP)

  • Default VPC

    • All new AWS accounts have a default VPC : ๋ชจ๋“  aws ๊ณ„์ •์€ ๊ธฐ๋ณธ VPC๋ฅผ ๊ฐ€์ง„๋‹ค.

    • New EC2 instances are launched into the default VPC if no subnet is specified : ์ง์ ‘ ๋งŒ๋“  VPC๊ฐ€ ์—†๋‹ค๋ฉด ์ƒˆ๋กœ์šด EC2๋Š” default VPC์— ํ• ๋‹น๋œ๋‹ค.

    • Default VPC has Internet connectivity and all EC2 instances inside it have public IPv4 addresses : Default VPC๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์ธํ„ฐ๋„ท์— ์—ฐ๊ฒฐ์— ๊ฐ€๋Šฅํ•˜๋„๋ก ์„ค์ •๋˜์–ด ์žˆ์–ด์„œ, ec2 ์ธ์Šคํ„ด์Šค๋Š” ์ธํ„ฐ๋„ท์˜ ๋ชจ๋‘๊ฐ€ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋Š” ๊ณต์ธ ip๋ฅผ ๊ฐ€์ง„๋‹ค. ์ฆ‰ ec2 ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ–ˆ๋Š”๋ฐ ๋ณด์•ˆ๊ทธ๋ฃน ํฌํŠธ๋ฅผ 22๋ฒˆ์œผ๋กœ ์„ค์ •ํ•ด์ฃผ์—ˆ์„ ๋•Œ ssh๋กœ ec2์— ์ ‘์†๊ฐ€๋Šฅํ–ˆ๋˜ ๊ฒƒ์ด ์ธํ„ฐ๋„ท์ด ์—ฐ๊ฒฐ๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. ์ธํ„ฐ๋„ท์ด ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์ง€ ์•Š์•˜๋‹ค๋ฉด ec2์ธ์Šคํ„ด์Šค์˜ ๊ณต์ธ ip๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์—ˆ์„ ๊ฒƒ์ด๋‹ค.

    • We also get a public and a private IPv4 DNS names : ๊ณต์ธ ip, ์‚ฌ์„ค ip๊ฐ€ ๋ชจ๋‘ ํ• ๋‹น๋œ๋‹ค.

  • VPC Overview

    • You can have multiple VPCs in an AWS region(max 5 per region โ€“ soft limit) : ํ•œ ๋ฆฌ์ „๋‹น ์ตœ๋Œ€ 5๊ฐœ(์†Œํ”„ํŠธ ๋ฆฌ๋ฐ‹)์˜ vpc๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋‹ค.

    • Max CIDR per VPC is 5, for each CIDR : ์œ„์™€ ๋น„์Šทํ•˜๊ฒŒ VPC๋‹น CIDR์„ ์ตœ๋Œ€ 5๊ฐœ ํ• ๋‹น ๊ฐ€๋Šฅํ•˜๋‹ค.

      • CIDR์˜ subnet mask๋Š” 16๋ถ€ํ„ฐ 28๊นŒ์ง€์ด๋‹ค.

      • Min size is /28 (16 IP addresses)

      • Max size is /16 (65536 IP addresses)

    • Because VPC is private, only the Private IPv4 ranges are allowed : VPC๋Š” ๋ง ๊ทธ๋Œ€๋กœ privateํ•˜๊ธฐ ๋•Œ๋ฌธ์— private ip๋งŒ ํ• ๋‹น ๊ฐ€๋Šฅํ•˜๋‹ค.

    • Your VPC CIDR should NOT overlap with your other networks : ๋‹น์—ฐํ•œ ๋ง์ด์ง€๋งŒ CIDR์€ ๋‹ค๋ฅธ ๋„คํŠธ์›Œํฌ์™€ ๊ตฌ๋ณ„์ด ๊ฐ€๋Šฅํ•ด์•ผ ํ•˜๋ฏ€๋กœ ๋‹ค๋ฅธ ๋„คํŠธ์›Œํฌ์— ๋ฎ์–ด์”Œ์šฐ๋ฉด ์•ˆ๋œ๋‹ค.

  • Subnet

    • AWS reserves 5 IP addresses (first 4 & last 1) in each subnet : aws vpc์˜ ์„œ๋ธŒ๋„ท ๋‚ด์˜ 5๊ฐœ์˜ ์‚ฌ์„ค ip๋Š” ์˜ˆ์•ฝ๋œ ip๋กœ, ip๋ฅผ ํ• ๋‹นํ•  ๋•Œ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค.

    • ex) 10.0.0.0, 10.0.0.1 - vpc router, 10.0.0.2 - mapping for dns, 10.0.0.3 - mapping for future use, 10.0.0.255

  • Internet Gateway(IGW)

    • VPC๋‚ด๋ถ€์˜ ์ž์›๋“ค์„ ์ธํ„ฐ๋„ท์— ์—ฐ๊ฒฐํ•ด์ฃผ๋Š” ์—ญํ• 

    • It scales horizontally and is highly available and redundant : ๊ณ ๊ฐ€์šฉ์„ฑ, ์šฉ์žฅ์„ฑ(์ผ๋‹จ ์—ฌ์œ ๋ถ„ ์กด์žฌ๋กœ ์ดํ•ดํ•จ)

    • Must be created separately from a VPC : VPC์™€ ๋”ฐ๋กœ ์ƒ์„ฑํ•ด์•ผ ํ•œ๋‹ค!

    • One VPC can only be attached to one IGW and vice versa : VPC์™€ IGW๋Š” ๋ฌด์กฐ๊ฑด 1:1๋งค์นญ์ด๋‹ค.

  • Bastion Hosts

    • private subnet์— ์ธํ„ฐ๋„ท ์—ฐ๊ฒฐ์ด ์•„๋‹Œ ssh์ ‘์†๋งŒ์„ ์›ํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

    • private subnet์— ์ธํ„ฐ๋„ท์„ ์—ฐ๊ฒฐํ•˜๋ ค๋ฉด NAT Instance or NAT Gateway๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค.

    • The bastion is in the public subnet which is then connected to all other private subnets : ๊ฐ•์˜ ์ž๋ฃŒ์—์„œ ์„ค๋ช…ํ•œ bastion host๋Š” VPC๋‚ด๋ถ€์— public subnet๊ณผ private subnet์ด ์กด์žฌํ•  ๋•Œ, public subnet๋‚ด๋ถ€์— ec2 instance๊ฐ€ ์žˆ๊ณ , ์ด ec2 instance๋งŒ private subnet์— ์ ‘๊ทผ๊ฐ€๋Šฅํ•˜๋‹ค.

    • Bastion Host security group must be tightened : bastion host์— ์ ‘๊ทผํ•˜๋ฉด ์‚ฌ์‹ค์ƒ private subnet์— ์ ‘๊ทผํ•  ๊ฐ€๋Šฅ์„ฑ์ด ์ƒ๊ธฐ๋Š” ๊ฒƒ์ด๋ฏ€๋กœ, bastion host์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ๋ณด์•ˆ ๊ทธ๋ฃน์€ tightํ•˜๊ฒŒ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค. ์ฆ‰ 22๋ฒˆ ํฌํŠธ๋งŒ ํ•„์š”ํ•œ IP๋ฅผ ๋Œ€์ƒ์œผ๋กœ ์—ด์–ด๋†“๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.(์‹œํ—˜)

#138 Bastion Host Hands-on

  • public subnet์˜ instance(๊ณต์ธ IP ์กด์žฌ)์—์„œ ssh๋กœ private subnet์˜ ์ธ์Šคํ„ด์Šค์— ์ ‘์†ํ•˜๋Š” ๊ฒƒ์„ ์ง„ํ–‰ํ–ˆ๋‹ค. private subnet์—์„œ ์ธํ„ฐ๋„ท ์‚ฌ์šฉ ๋ถˆ๊ฐ€.

#139 NAT Instance Hands-on

  • amazon nat instance ami๋ฅผ ์‚ฌ์šฉํ•ด NAT Instance๋ฅผ ๋งŒ๋“ค๊ณ , ๋ณด์•ˆ ๊ทธ๋ฃน์— 22 : SSH, 80 : HTTP(VPC CIDR), 443 : HTTPS(VPC CIDR), ICMP(VPC CIDR)๋ฅผ ํ—ˆ์šฉํ•œ๋‹ค.

  • Source / destination check disable

  • private subnet์˜ route table์— ๋กœ์ปฌ ๋„คํŠธ์›Œํ‚น์„ ์ œ์™ธํ•œ ๋‚˜๋จธ์ง€ destination์€ NAT Instance๋ฅผ ํ–ฅํ•˜๊ฒŒ ์„ค์ •

  • ์ดํ›„, private subnet์˜ ์ธ์Šคํ„ด์Šค์—์„œ ping, curl๋“ฑ์˜ ์ธํ„ฐ๋„ท ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•จ

  • ๊ฒฐ๋ก ์ ์œผ๋กœ private subnet์ด ์ธํ„ฐ๋„ท์— ๋…ธ์ถœ๋˜์ง€ ์•Š์€ ์ƒํƒœ์—์„œ NAT์„ ์ด์šฉํ•ด ์ธํ„ฐ๋„ท์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Œ

#140 Public Subnet vs Private Subnet

  • ๊ฐ•์˜ ์ž๋ฃŒ์—๋Š” ์—†์ง€๋งŒ ๋”ฐ๋กœ ์ •๋ฆฌํ•˜๋Š” ๊ฒƒ

  • subnet์„ ๋งŒ๋“ค ๋•Œ public์œผ๋กœ ํ• ์ง€ private์œผ๋กœ ํ•  ์ง€ ์„ ํƒ๋ž€์ด ์žˆ๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

  • ์‚ฌ์šฉ์ž๊ฐ€ ์ด ์„œ๋ธŒ๋„ท์€ public์œผ๋กœ ํ•  ๊ฒƒ์ด๊ณ , ๋‹ค๋ฅธ ์„œ๋ธŒ๋„ท์€ private์œผ๋กœ ํ•  ๊ฒƒ์œผ๋กœ ์ง์ ‘ ์ •ํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋ ‡๊ธฐ์— ๋„ค์ด๋ฐ์ด ์ค‘์š”ํ•˜๋‹ค.

  • ๊ฐ•์˜์—์„œ๋Š” public subnet์— subnet์˜ต์…˜์—์„œ auto-assign public ip๋ฅผ ํ™œ์„ฑํ™”ํ•ด์„œ, ๊ณต์ธ ip๋ฅผ ์ž๋™ํ• ๋‹นํ–ˆ๋‹ค. (์•„์ง ๋„๋ฉ”์ธ ๋„ค์ž„ ์„ค์ •์„ ํ•˜์ง€ ์•Š์•˜์œผ๋ฏ€๋กœ ๋„๋ฉ”์ธ ๋„ค์ž„ ์กด์žฌ x)

  • ๋”ฐ๋ผ์„œ ์ธํ„ฐ๋„ท์—์„œ public subnet์— auto assign๋œ ip๋กœ ์ด ์„œ๋ธŒ๋„ท์„ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๊ณ , public subnet๋˜ํ•œ IGW, Route table์„ ํ†ตํ•ด์„œ ์ธํ„ฐ๋„ท์— ์•ก์„ธ์Šค ํ•  ์ˆ˜ ์žˆ๋Š” ์–‘๋ฐฉํ–ฅ์˜ ํ†ต์‹ ์ด ๊ฐ€๋Šฅํ•ด์กŒ๋‹ค.

  • ์ฐธ๊ณ ๋กœ route table์€ public subnet, private subnet์— ํ•œ ๊ฐœ์”ฉ ๋”ฐ๋กœ ๋งŒ๋“ค์—ˆ๋‹ค.

#141 NAT Instance

  • Deprecated๋˜์—ˆ๊ณ , NAT Gateway์˜ ํ•˜์œ„ํ˜ธํ™˜์ด๋‹ค.

  • Not highly available

    • highly availableํ•˜๊ฒŒ ๋งŒ๋“œ๋ ค๋ฉด asg๋ฅผ multi-az์— ๋งŒ๋“œ๋Š” ๋“ฑ ์ถ”๊ฐ€์ ์ธ ์ˆ˜๊ณ ๊ฐ€ ๋“ค์–ด๊ฐ„๋‹ค.

  • Internet traffic bandwidth depends on EC2 instance type

  • NAT = Network Address Translation

  • Allows EC2 instances in private subnets to connect to the Internet : public subnet์ด ์•„๋‹Œ private subnet์ด ์ธํ„ฐ๋„ท์— ์ ‘์† ๊ฐ€๋Šฅํ•˜๋„๋ก ํ•ด์ค€๋‹ค.

  • Must be launched in a public subnet : public subnet์˜ internet gateway, route table์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

  • Must disable EC2 setting: Source / destination Check : NAT์ด๋ฆ„์—์„œ๋„ ๋ณผ ์ˆ˜ ์žˆ๋“ฏ ์š”์ฒญ ๊ฐ„์˜ src, dest๋ฅผ ๋ฐ”๊พธ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

  • Must have Elastic IP attached to it : ๊ณ ์ • ip ์ฃผ์†Œ๋ฅผ ๊ฐ€์ ธ์•ผ๋งŒ ํ•œ๋‹ค.

  • Route Tables must be configured to route traffic from private subnets to the NAT Instance : route table์„ ๋กœ์ปฌ ๋„คํŠธ์›Œํ‚นํ•  ๊ฒฝ์šฐ๊ฐ€ ์•„๋‹Œ ๊ฒฝ์šฐ ๋ชจ๋“  ํŠธ๋ž˜ํ”ฝ์„ NAT Instance๋ฅผ ๋ฐ”๋ผ๋ณด๊ฒŒ ํ•ด์•ผ ํ•œ๋‹ค.

#142 NAT Gateway

  • AWS-managed NAT, higher bandwidth, high availability, no administration : ๊ด€๋ฆฌ๊ฐ€ ํ•„์š”์—†๋Š” ๋ฐ๋‹ค๊ฐ€ ๋ณด์•ˆ๊ทธ๋ฃน ์„ค์ •๋„ ํ•„์š”์—†๋‹ค.

  • NATGW is created in a specific Availability Zone, uses an Elastic IP

  • Canโ€™t be used by EC2 instance in the same subnet (only from other subnets) : private subnet์ด ์•„๋‹Œ public subnet์— ๋งŒ๋“ค์–ด์•ผ ํ•œ๋‹ค.

  • Requires an IGW (Private Subnet => NATGW => IGW) : NAT ๊ฒŒ์ดํŠธ์›จ์ด ์—ญ์‹œ IGW๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

  • 5 Gbps of bandwidth with automatic scaling up to 45 Gbps

  • NAT Gateway is resilient within a single Availability Zone : NAT Gateway๋Š” ์‹ฑ๊ธ€ AZ์— ๋Œ€ํ•ด์„œ๋งŒ ํšŒ๋ณต ํƒ„๋ ฅ์„ฑ์„ ๊ฐ€์ง„๋‹ค.

    • Must create multiple NAT Gateways in multiple AZs for fault-tolerance : fault-tolerance๋ฅผ ์œ„ํ•ด์„œ๋Š” multi az์— NAT Gateway๋ฅผ ๋งŒ๋“ค์–ด์•ผ ํ•œ๋‹ค.

    • There is no cross-AZ failover needed because if an AZ goes down it doesn't need NAT : ํ•œ AZ๊ฐ€ ๋‹ค์šด๋˜์—ˆ๋‹ค๋ฉด NAT๊ฐ€ ํ•„์š” ์—†๋‹ค.

#143 DNS Resolution in VPC

  • DNS Support : ์ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด Route 53 Resolver๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ธฐ์— Custom DNS server๋ฅผ ๋”ฐ๋กœ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์‚ฌ์šฉํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค.

  • DNS Hostnames : ์ด๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด private dns๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜ํ•œ private์ด๊ธฐ ๋•Œ๋ฌธ์— ๋„๋ฉ”์ธ ๋„ค์ž„์„ ๊ตฌ๋งคํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค.

    • VPC DNS Hostname์„ ํ™œ์„ฑํ™”ํ•˜๋ฉด public subnet์—์„œ public ipv4์„ ๋ณด์œ ํ•˜๊ณ  ์žˆ๋˜ ์ธ์Šคํ„ด์Šค๋Š” public ipv4 DNS๋„ ๊ฐ–๊ฒŒ ๋œ๋‹ค.

  • ์œ„ ๋‘๊ฐ€์ง€๋ฅผ ๋™์‹œ์— ์‚ฌ์šฉํ•˜๋ฉด, Route 53 Resolver์— private ๋„๋ฉ”์ธ ๋„ค์ž„์„ ์ฟผ๋ฆฌํ•˜๋ฉด private ip๋ฅผ ๋˜๋Œ๋ ค์ค€๋‹ค.

  • Route 53 Hosted Zone์„ ์‚ฌ์šฉํ•ด private domain name ์‚ฌ์šฉํ•˜๊ธฐ

      1. VPC์—์„œ enableDnsSupport & enableDnsHostname ํ™œ์„ฑํ™”(์•ˆ ํ•ด๋„ ์„ค์ •์ฐฝ์—์„œ ๋‚˜์ค‘์— ํ•˜๊ฒŒ ๋จ)

      1. Route 53 Hosted Zone ์ ‘์†

      1. ํŠธ๋ž˜ํ”ฝ์„ aws VPC์—์„œ ๋ผ์šฐํŒ…ํ•˜๋Š” Private Hosted Zone์„ ํƒ

      1. Specific VPC ์„ ํƒ

      1. ์œ„์—์„œ ์„ค์ •ํ•œ VPC๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐ”์Šคํ‹ฐ์˜จ ํ˜ธ์ŠคํŠธ์— ์ ‘์†

      1. Route53์— private domain name(ex. google.demo.internal)์— ๋Œ€ํ•ด์„œ CNAME๋ ˆ์ฝ”๋“œ์˜ ๊ฐ’์œผ๋กœ www.google.com์„ ์ž…๋ ฅํ•˜๋ฉด www.google.com์— ์ ‘์†ํ•  ์ˆ˜ ์žˆ๋‹ค.(์ธํ„ฐ๋„ท ๊ฒŒ์ดํŠธ์›จ์ด & Route table & NAT Gateway ํ™œ์„ฑํ™” ์ƒํƒœ)

      1. ๊ฒฐ๋ก ์ ์œผ๋กœ Route 53 Private Hosted Zone์„ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด VPC์•ˆ์—์„œ private domain name์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ์ธํ„ฐ๋„ท ๊ฒŒ์ดํŠธ์›จ์ด & Route table & NAT Gateway ํ™œ์„ฑํ™” ์ƒํƒœ๋ผ๋ฉด private domain name๊ณผ public domain name์„ ๋™์‹œ์— ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์–ด์„œ ๊ต‰์žฅํžˆ ์œ ์šฉํ•˜๋‹ค. (์œ„์—์„œ ๋ณธ google.demo.internal(private domain name)๊ณผ www.google.com(public domain name)์„ ๋™์‹œ์— ์‚ฌ์šฉํ•œ ๊ฒƒ์ด ๊ทธ ์˜ˆ์ด๋‹ค.)

#144 Security Groups & NACLs

  • NACL : ์š”์ฒญ ๋ฐ ์‘๋‹ต์— ๋Œ€ํ•ด Statelessํ•˜๋‹ค. Statelessํ•˜๋‹ค๋Š” ๊ฒƒ์€ ์ƒํƒœ๊ฐ€ ์—†๊ธฐ ๋•Œ๋ฌธ์— ์š”์ฒญ ๋ฐ ์‘๋‹ต์€ ํ•ญ์ƒ ํ‰๊ฐ€๋œ๋‹ค.

  • Security Group : ์š”์ฒญ ๋ฐ ์‘๋‹ต์— ๋Œ€ํ•ด Statefulํ•˜๋‹ค. Statefulํ•˜๋‹ค๋Š” ๊ฒƒ์€ ์ƒํƒœ๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์š”์ฒญ ๋ฐ ์‘๋‹ต์ด ์ƒํƒœ์— ๋”ฐ๋ผ ํ‰๊ฐ€๋œ๋‹ค. ๋”ฐ๋ผ์„œ Inbound๊ฐ€ ํ—ˆ์šฉ๋˜์—ˆ๋‹ค๋ฉด ๊ทธ์— ๋”ฐ๋ฅธ Outbound๋„ ํ—ˆ์šฉ๋˜๊ณ  vice versa์ด๋‹ค.

#145 Network Access Control List (NACL)

  • NACL are like a firewall which control traffic from and to subnets : ์„œ๋ธŒ๋„ท ๋ฐฉํ™”๋ฒฝ๊ณผ ๊ฐ™์Œ

  • One NACL per subnet, new subnets are assigned the Default NACL : ์„œ๋ธŒ๋„ท๊ณผ NACL์€ 1:1 ๋งคํ•‘์ด๋‹ค.

    • default NACL์€ ๋ชจ๋“  ์š”์ฒญ๊ณผ ์‘๋‹ต์„ ํ—ˆ์šฉํ•œ๋‹ค.

  • Newly created NACLs will deny everything

    • default๊ฐ€ ์•„๋‹Œ ์ปค์Šคํ…€ ์ƒ์„ฑ๋œ NACL์€ ๊ธฐ๋ณธ ๋ฃฐ๋กœ ๋ชจ๋“  ์š”์ฒญ๊ณผ ์‘๋‹ต์„ denyํ•œ๋‹ค.

  • NACL are a great way of blocking a specific IP address at the subnet level : ๋ณด์•ˆ ๊ทธ๋ฃน์€ ec2 instance level

#146 Ephemeral Ports

  • ์‘๋‹ต์ด ์š”์ฒญ๋œ ip์˜ ํฌํŠธ์— ์ „๋‹ฌ๋˜๊ธฐ ์œ„ํ•ด์„œ ์ž„์‹œ ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ์ด๊ฒƒ์„ ephemeral port๋ผ๊ณ  ๋ถ€๋ฅธ๋‹ค.

  • 677p ๋‹ค์ด์–ด๊ทธ๋žจ ์ฐธ๊ณ  : ์ž„์‹œ ํฌํŠธ๊ฐ€ ๋  ์ˆ˜ ์žˆ๋Š” ๋ชจ๋“  ํฌํŠธ๋ฅผ inbound, outbound rule์—์„œ ํ—ˆ์šฉํ•ด์ค˜์•ผ ํ•œ๋‹ค.

#147 Security Group vs NACLs

  • 679p ํ‘œ ํ•„ํžˆ ์ฐธ๊ณ 

#148 More On VPC

  • 679p ์ดํ›„๋Š” ๋‹ค์ด์–ด๊ทธ๋žจ, ์˜ˆ์‹œ๋ฅผ ๋ณด๋Š” ๊ฒƒ์ด ํŽธํ•˜๋‹ค. VPC Section์€ ์ž๋ฃŒ๋ฅผ ๋ณด์ž.

#149 ClassicLink

  • ec2 classic์€ ํ˜„์žฌ ๋งŒ๋“ค ์ˆ˜ ์—†์Œ ๊ทธ๋ƒฅ ๋ฐฐ๊ฒฝ์ง€์‹ classic link๋˜ํ•œ ๊ณผ๊ฑฐ์˜ ec2 classic ๋•Œ๋ฌธ์— ์กด์žฌํ•˜๋Š” ๊ฒƒ

#150 VPC Endpoints & Private Link

  • VPC Endpoint์™€ VPC PrivateLink๋Š” ๋™์ผํ•œ VPC Endpoint๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ, ์ฐจ์ด์ ์€ VPC PrivateLink๋Š” ๋„คํŠธ์›Œํฌ ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ๋‚˜ ๊ฒŒ์ดํŠธ์›จ์ด ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ๋ฅผ ์‚ฌ์šฉํ•œ ์ปค์Šคํ…€ Endpoint Service๋ฅผ ๋งŒ๋“  ํ›„ CreateVPCEndpoint์—์„œ find service by name ํ•ด์•ผํ•˜์ง€๋งŒ, VPC Endpoint๋Š” ์ปค์Šคํ…€ Endpoint Service๋ฅผ ๋งŒ๋“ค ํ•„์š” ์—†์ด CreateVPCEndpoint์—์„œ AWS Service๋ฅผ ์„ ํƒํ•˜๊ณ  ์›ํ•˜๋Š” Interface, Gateway๋ฅผ ๊ณ ๋ฅด๋ฉด ๋œ๋‹ค.๋‹น์—ฐํžˆ ์ด๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ด์œ ๋Š” ๋™์ผํ•˜๊ฒŒ ์ „์ฒด vpc๋ฅผ ๋…ธ์ถœํ•˜์ง€ ์•Š๊ณ  ์›ํ•˜๋Š” ์„œ๋น„์Šค์— ๋Œ€ํ•ด์„œ๋งŒ ๋…ธ์ถœํ•˜๊ณ  private network(aws network)๋ฅผ ์‚ฌ์šฉํ•ด public network๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์ง€ ์•Š์„ ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

#151 Direct Connect

  • Direct Connect โ€“ Connection Types : Lead times are often longer than 1 month to establish a new connection : ์ƒˆ๋กœ์šด ์ปค๋„ฅ์…˜์„ ๋งŒ๋“œ๋Š”๋ฐ 1๋‹ฌ ์ด์ƒ์ด ๊ฑธ๋ฆฌ๋ฏ€๋กœ ์„ค๊ณ„ ์ด์ „์— ์ธ์ง€ํ•˜๊ณ  ์žˆ์–ด์•ผ ํ•œ๋‹ค.

#152 ECMP(Equal-cost multi-path routing)

  • VPN to private virtual gateway : two tunnel์€ ํ•˜๋‚˜์˜ forward, ํ•˜๋‚˜์˜ backward๋กœ ๋™์‹œ์— ์ด๋ค„์งˆ ์ˆ˜ ์—†์Œ

  • VPN to transit gateway : two tunnel์€ ๋‘ ๊ฐœ์˜ tunnel์„ ๋™์‹œ์— ์‚ฌ์šฉํ•˜๋ฏ€๋กœ ecmp๋ฅผ ๊ตฌํ˜„ํ•˜๊ณ , increase bandwidth์ด๋ฉฐ, ๊ฒŒ์ดํŠธ์›จ์ด๋ฅผ ํ†ตํ•ด ์ „์†ก๋œ gb๋งŒํผ payํ•จ

#153 Route Table

  • VPC Peering : route table๋กœ ์–ด๋–ค private ip์ผ ๊ฒฝ์šฐ ์–ด๋–ป๊ฒŒ ๋ผ์šฐํŒ… ๋  ๊ฒƒ์ธ์ง€๋ฅผ ๊ฐ VPC์˜ ๋ผ์šฐํŒ… ํ…Œ์ด๋ธ”๋งˆ๋‹ค ์ •ํ•ด์•ผ ํ•จ. VPC Peering hands on ์ฐธ๊ณ 

  • VPC Endpoint Gateway : ๋˜ ํ•˜๋‚˜ VPC Endpoint interface์œ ํ˜•๊ณผ ๋‹ฌ๋ฆฌ VPC Endpoint Gateway๋Š” ๋ผ์šฐํŠธ ํ…Œ์ด๋ธ”์— ์ ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์–ด๋–ค subnet route table์— ์ ์šฉํ•  ๊ฑด์ง€ ์„ ํƒํ•ด์•ผ ํ•œ๋‹ค. ex. private subnet route table์— ์ ์šฉํ•˜๋ฉด route table์— ์ž๋™์œผ๋กœ private link๊ฐ€ ์ ์šฉ๋จ(s3, dynamoDB only)

  • VPC Endpoint interface์œ ํ˜•์€ ํŠน์ • aws์„œ๋น„์Šค๋ฅผ ์„ ํƒํ•œ ํ›„ VPC์™€ Subnet, security group์„ ์„ค์ •ํ•ด์•ผ ํ•จ

#154 RPO and RTO

  • RPO(Recovery Point Objective) : ์‰ฝ๊ฒŒ ๋งํ•˜๋ฉด ์„ธ์ด๋ธŒ ์‹œ์ ์ด๋‹ค. ์„ธ์ด๋ธŒ ์‹œ์  ์ดํ›„์—๋Š” ๋ฐฑ์—…์ด ๋˜์ง€ ์•Š์•˜์œผ๋ฏ€๋กœ ์„ธ์ด๋ธŒ ์‹œ์ ๋ถ€ํ„ฐ disaster๋ฐœ์ƒ ์‹œ์ ๊นŒ์ง€๋Š” ๋ฐ์ดํ„ฐ ์†์‹ค์ด ์ƒ๊ธด๋‹ค.

  • RTO(Recovery Time Objective) : Disaster๋ฐœ์ƒ ์‹œ์ ๋ถ€ํ„ฐ RTO๊นŒ์ง€ ๊ฑธ๋ฆฐ ์‹œ๊ฐ„์ด downtime์ด๋‹ค.

#155 DMS โ€“ Database Migration Service

  • DMS๋Š” Schema Conversion Tool(SCT)๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์Šคํ‚ค๋งˆ๊ฐ€ ๋‹ค๋ฅธ db๊ฐ„์˜ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜๋„ ์ง€์›ํ•œ๋‹ค.

  • ๋˜ํ•œ Continuous Replication์ด ๊ฐ€๋Šฅํ•ด์„œ ์‹คํ–‰์ค‘์ธ ์„œ๋น„์Šค์˜ db๋งˆ์ด๊ทธ๋ ˆ์ด์…˜๋„ ์ ์ง„์ ์œผ๋กœ ๊ฐ€๋Šฅํ•˜๋‹ค.

#156 AWS DataSync

  • ๋งŽ์€ ์–‘์˜ ๋ฐ์ดํ„ฐ๋ฅผ on-premise์„œ๋ฒ„์—์„œ aws๋กœ ์˜ฎ๊ธฐ๋Š” ์„œ๋น„์Šค

  • Amazon S3 (any storage classes โ€“ including Glacier), Amazon EFS, Amazon FSx for Windows

  • Move data from your NAS or file system via NFS or SMB : NAS(Network Attached Service)๋กœ๋ถ€ํ„ฐ NFS(Network File System) or SMB(Server Message Protocol)ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•œ๋‹ค.

  • Replication tasks can be scheduled hourly, daily, weekly : ์‹ค์‹œ๊ฐ„์ด ์•„๋‹Œ ์Šค์ผ€์ฅด๋ง ์„œ๋น„์Šค์ด๋‹ค.

  • Leverage the DataSync agent to connect to your systems : on-premise ์„œ๋ฒ„์— datasync agent๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์–ด์•ผ ํ•œ๋‹ค.

#157 High Performance Computing(HPC)

  • EC2 Enhanced Networking(SR-IOV) : ENA๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ 100 Gbps๊นŒ์ง€ ๋„คํŠธ์›Œํ‚น ์†๋„๋ฅผ ์˜ฌ๋ฆด ์ˆ˜ ์žˆ๋‹ค.

    • Elastic Network Adapter(ENA) up to 100 Gbps

  • Elastic Fabric Adapter(EFA) : ENA์˜ ๊ฐ•ํ™” ๋ฒ„์ „์ธ EFA๋„ ์กด์žฌํ•œ๋‹ค.

    • Improved ENA for HPC, only works for Linux

    • Great for inter-node communications, tightly coupled workloads

#158 CloudFormation

  • Terraform๊ฐ™์€ Infrastructure as code

  • Resources: your AWS resources declared in the template(MANDATORY) : Cloudformation์œผ๋กœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ๋•Œ resource๋Š” ํ•„์ˆ˜์ ์œผ๋กœ ์ ์–ด์•ผ ํ•œ๋‹ค๋Š” ์˜๋ฏธ์ด๋‹ค.

  • CloudFormation StackSets

    • ํ•œ ์ฝ”๋“œ๋กœ ์—ฌ๋Ÿฌ ๊ณ„์ •, ์—ฌ๋Ÿฌ ๋ฆฌ์ „์˜ infrastruture๋ฅผ ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋‹ค.

#159 AWS Step Functions

  • Build serverless visual workflow to orchestrate your Lambda functions : ๋‹ค์ด์–ด๊ทธ๋žจ์„ ํ†ตํ•ด workflow๋ฅผ ๊ทธ๋ฆฌ๋ฉด, lambda function์˜ sequence๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค. ํ•œ ๋งˆ๋””๋กœ ๋žŒ๋‹ค function์˜ ์ˆœ์„œ ๋ฐ ๊ตฌ์„ฑ๋„๋ฅผ ๋ณด๋ฉด์„œ, ์‹ค์ œ ์ง„ํ–‰์ƒํ™ฉ์„ ๊ด€์ฐฐํ•˜๋ฉฐ ์‹คํ–‰์„ ํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋น„์Šค์ด๋‹ค.

  • AWS SWF(Simple Workflow Service)

    • AWS Step Functions์ด ๊ถŒ์žฅ๋˜๊ณ  SWF๋Š” deprecated๋ฒ„์ „์ด๋‹ค.

    • ์•„๋ž˜ ๋‘ ๊ฒฝ์šฐ์ผ ๊ฒฝ์šฐ์—๋งŒ ์ œ์™ธํ•˜๊ณ  ๋ชจ๋‘ Step Function์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค.

    • If you need external signals to intervene in the processes

    • If you need child processes that return values to parent processes

#160 Amazon EMR

  • EMR helps creating Hadoop clusters(Big Data) to analyze and process vast amount of data

  • The clusters can be made of hundreds of EC2 instances, Auto-scaling and integrated with Spot instances

#161 AWS Opsworks

  • Chef & Puppet help you perform server configuration automatically, or repetitive actions : ์„œ๋ฒ„ config ์„ค์ • ์ž๋™ํ™”

  • Chef / Puppet have similarities with SSM / Beanstalk / CloudFormation but theyโ€™re open-source tools that work cross-cloud : Chef, Puppet์€ ์˜คํ”ˆ์†Œ์Šค์ด๊ธฐ ๋•Œ๋ฌธ์— ํŠน์ • ํด๋ผ์šฐ๋“œ ์—…์ฒด์— ๊ตญํ•œ๋˜์ง€ ์•Š๊ณ  ์‚ฌ์šฉ ๊ฐ€๋Šฅ

#162 AWS WorkSpaces

  • Managed, Secure Cloud Desktop : ๊ด€๋ฆฌํ˜•์ด์ž ๋ณด์•ˆ๊ฐ•ํ™”ํ˜•์˜ ํด๋ผ์šฐ๋“œ ๋ฐ์Šคํฌํƒ‘ ์„œ๋น„์Šค

  • Great to eliminate management of on-premise VDI(Virtual Desktop Infrastructure) : on-premise์˜ ์ž์›์„ ํด๋ผ์šฐ๋“œ์—์„œ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— on-premise์˜ VDI๋ฅผ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ‘œํ˜„ํ•œ ๊ฒƒ

  • On Demand, pay per by usage : ์‚ฌ์šฉํ•œ ๋งŒํผ ๋ˆ ์ง€๋ถˆ

  • Microsoft Active Directory์™€ ํ†ตํ•ฉ ๊ฐ€๋Šฅ

#163 Cost Explorer โ€“ Savings Plan์กด์žฌ

#164 Well Architected Framework 5 Pillars

  • 1.Operational Excellence : Includes the ability to run and monitor systems to deliver business value and to continually improve supporting processes and procedures

    • ๋™์ž‘ ํƒ์›”์„ฑ : ๋น„์ฆˆ๋‹ˆ์Šค ๊ฐ€์น˜๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋ฉฐ ์ด์ƒ์ด ์—†๋Š”์ง€ ๊ด€์ฐฐํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•˜๋ฉฐ, ์ง€์†์ ์œผ๋กœ ํ”„๋กœ์„ธ์Šค์™€ ์ ˆ์ฐจ๋ฅผ ๊ฐœ์„ ์‹œ์ผœ๋‚˜๊ฐ€์•ผํ•œ๋‹ค.

  • 2.Security : Includes the ability to protect information, systems, and assets while delivering business value through risk assessments and mitigation strategies

    • ๋ณด์•ˆ : ๋น„์ฆˆ๋‹ˆ์Šค ๊ฐ€์น˜๋ฅผ ์ „๋‹ฌํ•จ๊ณผ ๋™์‹œ์— ์œ„ํ—˜์— ๋Œ€ํ•œ ํ‰๊ฐ€๋ฅผ ์‹คํ–‰ํ•˜๋ฉฐ, ์œ„ํ—˜ ์™„ํ™” ์ „๋žต์„ ์„ธ์šฐ๊ณ  ์ •๋ณด, ์‹œ์Šคํ…œ, ์ž์›๋“ค์„ ๋ณดํ˜ธํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.

  • 3.Reliability : Ability of a system to recover from infrastructure or service disruptions, dynamically acquire computing resources to meet demand, and mitigate disruptions such as misconfigurations or transient network issues

    • ์‹ ๋ขฐ์„ฑ : ์ธํ”„๋ผ๋‚˜ ์„œ๋น„์Šค์˜ ๋‹ค์šด์ด ๋ฐœ์ƒํ•ด๋„, ๋™์ ์œผ๋กœ ์ปดํ“จํŒ… ๋ฆฌ์†Œ์Šค๋“ค์„ ์ˆ˜์š”์— ๋งž๊ฒŒ ๊ณต๊ธ‰ํ•ด์•ผ ํ•˜๋ฉฐ ์„ค์ • ์˜ค๋ฅ˜, ๋„คํŠธ์›Œํฌ ์ง€์—ฐ๊ณผ ๊ฐ™์€ ์ด์Šˆ๋“ค์„ ์™„ํ™”ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.

  • 4.Performance Efficiency : Includes the ability to use computing resources efficiently to meet system requirements, and to maintain that efficiency as demand changes and technologies evolve

    • ํผํฌ๋จผ์Šค ํšจ์œจ์„ฑ : ์‹œ์Šคํ…œ์˜ ์š”๊ตฌ์— ๋งž๋Š” ์ปดํ“จํŒ… ์ž์›์„ ์‚ฌ์šฉํ•  ์ค„ ์•Œ์•„์•ผ ํ•˜๋ฉฐ, ๊ทธ ์ž์›๋“ค์„ ๊ธฐ์ˆ  ์ง„ํ™”์— ๋”ฐ๋ผ ํšจ์œจ์ ์œผ๋กœ ์œ ์ง€๋ณด์ˆ˜ํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค.

  • 5.Cost Optimization : Includes the ability to run systems to deliver business value at the lowest price point

    • ๊ฐ€์žฅ ๋‚ฎ์€ ๊ฐ€๊ฒฉ์œผ๋กœ ๋น„์ฆˆ๋‹ˆ์Šค ๊ฐ€์น˜๋ฅผ ์ „๋‹ฌํ•  ์ค„ ์•Œ์•„์•ผ ํ•œ๋‹ค.

  • AWS Well-Architected Tool๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์œ„ ์งˆ๋ฌธ์— ๋Œ€ํ•ด ๋ณด์™„ ๊ฐ€๋Šฅ(AWS Well-Architected Tool : ์œ„ 5๊ฐ€์ง€ ํ•ต์‹ฌ ์ฝ”์–ด์— ๋Œ€ํ•œ ์งˆ๋ฌธ๋“ค๋กœ ๊ตฌ์„ฑ)

  • ์‘๋‹ต ๊ฒฐ๊ณผ์— ๋Œ€ํ•œ ๋ฆฌํฌํŠธ ์ œ๊ณต, best practice ์ œ๊ณต

#165 Trusted Advisor

  • High level AWS account assessment : ์–•์€ ๋ ˆ๋ฒจ์˜ AWS ๊ณ„์ • ํ‰๊ฐ€, ๋ถ„์„ ์„œ๋น„์Šค

  • 5 Standards

    • Cost Optimization

    • Performance

    • Security

    • Fault Tolerance

    • Service Limits

  • Core Checks and recommendations โ€“ all customers : ๋ชจ๋“  ์‚ฌ์šฉ์ž๊ฐ€ ์ฝ”์–ด ์ฒดํฌ๋ฅผ ํ•˜๊ฑฐ๋‚˜ ์ถ”์ฒœ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค.

  • Full Trusted Advisor โ€“ Available for Business & Enterprise support plans : Business & Enterprise์˜ ์œ ๋ฃŒ ํ”Œ๋žœ์„ ์‚ฌ์šฉํ•˜๋ฉด ์•„๋ž˜ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

    • Ability to set CloudWatch alarms when reaching limits : limit๋„๋‹ฌ ์‹œ ์•Œ๋žŒ ์ œ๊ณต

    • Programmatic Access using AWS Support API : Trusted Advisor๋กœ์˜ Programmatic Access๋ฅผ ์œ„ํ•œ api์ œ๊ณต

#166 More Architecture Link

  • https://aws.amazon.com/architecture/

  • https://aws.amazon.com/solutions/

#177 DNS

  • DNS : Domain Name System which translates the human friendly hostnames into the machine IP addresses

  • NAME SERVER : resolves DNS queries

  • Domain Registrar : ๋„๋ฉ”์ธ ๋„ค์ž„ ๋“ฑ๋ก ๋Œ€ํ–‰์ž > route53, ๊ฐ€๋น„์•„ ๋“ฑ๋“ฑ

  • SAA ๋ฌธ์ œ ์ •๋ฆฌ > #69์ฐธ๊ณ ํ•  ๊ฒƒ

#178 Route53

  • Except for Alias records, TTL is mandatory for each DNS record

#179 FSx

  • Amazon FSx for Windows

    • SMB, NTFS, NFS, Microsoft Active Directory integration

    • Can be accessed from your on-premise infrastructure

  • Amazon FSx for Lustre

    • High Performance Computing(HPC)

    • Seamless integration with S3

      • Can โ€œread S3โ€ as a file system (through FSx)

      • Can write the output of the computations back to S3 (through FSx)

  • Scratch File System

    • ๋†’์€ ์„ฑ๋Šฅ, ๋ฐ์ดํ„ฐ๋Š” ๋ณต์ œ๋˜์ง€ ์•Š์•„ ์ž„์‹œ ์Šคํ† ๋ฆฌ์ง€ ํ˜•์‹์ž„

  • Persistent File System

    • ๋ฐ์ดํ„ฐ๊ฐ€ ๋ณต์ œ๋˜์–ด Long-term storage๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ์Œ

#180 Storage Gateway

  • ์˜จ ํ”„๋ ˆ๋ฏธ์Šค์—์„œ s3๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ•˜๋‚˜? - AWS Storage Gateway๊ฐ€ ๋‹ต์ด๋‹ค.

  • File Gateway

    • NFS, SMB

    • Integrated with Active Directory(AD)

  • Volume Gateway

    • Block Storage

    • Cached volumes: low latency access to most recent data

    • Stored volumes: entire dataset is on premise, scheduled backups to S3

  • Tape Gateway

  • Hardware Appliance

    • No on-premises virtualization : ์˜จํ”„๋ ˆ๋ฏธ์Šค์—์„œ ๊ฐ€์ƒํ™”๋ฅผ ํ•ด์•ผ storage gateway๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ ๊ฐ€์ƒํ™”๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์„ ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ์˜ต์…˜์ด ์ด๊ฒƒ์ž„.

#181 AWS Transfer Family

  • A fully-managed service for file transfers into and out of Amazon S3 or Amazon EFS using the FTP protocol

Last updated