개발자를 위한 amazon lightsail deep-dive

42
Amazon Lightsail Deep-Dive (@seapy) -

Upload: -

Post on 13-Apr-2017

49 views

Category:

Engineering


9 download

TRANSCRIPT

Page 1: 개발자를 위한 Amazon Lightsail Deep-Dive

Amazon Lightsail Deep-Dive

(@seapy) -

Page 2: 개발자를 위한 Amazon Lightsail Deep-Dive

AWS re:invent 2016

Page 3: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 4: 개발자를 위한 Amazon Lightsail Deep-Dive

, , &

Page 5: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 6: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 7: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 8: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 9: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 10: 개발자를 위한 Amazon Lightsail Deep-Dive
Page 11: 개발자를 위한 Amazon Lightsail Deep-Dive

Lightsail VPS

AWS EC2

EC2, EBS, Key Pair, Security Group, Elastic IP...

EC2 / / ,EBS , ...

Page 12: 개발자를 위한 Amazon Lightsail Deep-Dive

(IP, Stop, Restart)

Page 13: 개발자를 위한 Amazon Lightsail Deep-Dive

SSH

Page 14: 개발자를 위한 Amazon Lightsail Deep-Dive

Lightsail No-nonsense pricing?

Page 15: 개발자를 위한 Amazon Lightsail Deep-Dive

• : $0.0067/ ($5/ )

• : $0.09/

• : $0.05/

• 20 $1

• IP : $0.005/

• DNS

• 3 DNS

• $0.40/

Page 16: 개발자를 위한 Amazon Lightsail Deep-Dive

• $5 750

• AWS

Page 17: 개발자를 위한 Amazon Lightsail Deep-Dive

• : 20

• IP : 5

• DNS : 3

Page 18: 개발자를 위한 Amazon Lightsail Deep-Dive

Page 19: 개발자를 위한 Amazon Lightsail Deep-Dive

• CLI, SDK

Page 20: 개발자를 위한 Amazon Lightsail Deep-Dive

CLI • SSH Key

• / , / /

• /

• .

Page 21: 개발자를 위한 Amazon Lightsail Deep-Dive

CLI •

Page 22: 개발자를 위한 Amazon Lightsail Deep-Dive

CLI $ pip install --upgrade awscli

Page 23: 개발자를 위한 Amazon Lightsail Deep-Dive

IAM Policy

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "lightsail:*" ], "Resource": "*" } ]}

Page 24: 개발자를 위한 Amazon Lightsail Deep-Dive

$ aws lightsail \ --region ap-northeast-2 \ get-regions

Could not connect to the endpoint URL: "https://lightsail.ap-northeast-2.amazonaws.com/"

Page 25: 개발자를 위한 Amazon Lightsail Deep-Dive

$ aws lightsail \ --region us-east-1 \ --include-availability-zones \ get-regions

{ "regions": [ { "name": "us-east-1", "availabilityZones": [ { "zoneName": "us-east-1b", "state": "available" }, { "zoneName": "us-east-1c", "state": "available" },

Page 26: 개발자를 위한 Amazon Lightsail Deep-Dive

$ aws lightsail \ get-bundles

Page 27: 개발자를 위한 Amazon Lightsail Deep-Dive

{ "bundles": [ { "price": 5.0, "cpuCount": 1, "diskSizeInGb": 20, "bundleId": "nano_1_0", "instanceType": "t2.nano", "power": 300, "ramSizeInGb": 0.5, "transferPerMonthInGb": 1000 }, ... ]}

Page 28: 개발자를 위한 Amazon Lightsail Deep-Dive

• $5, nano_1_0, t2.nano

• $10, micro_1_0, t2.micro

• $20, small_1_0, t2.small

• $40, medium_1_0, t2.medium

• $80, large_1_0, t2.large

Page 29: 개발자를 위한 Amazon Lightsail Deep-Dive

EC2 • t2.nano(EC2 vs Lightsail)

• $0.0059/ vs $0.007/

• 1 $2.8/ vs $5/• t2.large(EC2 vs Lightsail)

• $0.094/ vs $0.108/

• 1 $45.75/ vs $80/

EBS 20 ($2) t2.nano Lightsail Lightsail 1TB $90

Page 30: 개발자를 위한 Amazon Lightsail Deep-Dive

blueprint •

• OS wordpress

$ aws lightsail \ get-blueprints

Page 31: 개발자를 위한 Amazon Lightsail Deep-Dive

{ "blueprints": [ { "blueprintId": "amazon_linux_2016_09_0", "name": "Amazon Linux", "group": "amazon-linux", "type": "os", ... { "blueprintId": "ubuntu_16_04", "name": "Ubuntu", "group": "ubuntu", "type": "os", ... { "blueprintId": "wordpress_4_6_1", "name": "WordPress", "group": "wordpress", "type": "app", ...

Page 32: 개발자를 위한 Amazon Lightsail Deep-Dive

$ aws lightsail \ create-instances \ --instance-names reinvent \ --availability-zone us-east-1b \ --blueprint-id ubuntu_16_04 \ --bundle-id nano_1_0

Page 33: 개발자를 위한 Amazon Lightsail Deep-Dive

IP $ aws lightsail \ get-instance \ --instance-name reinvent

Page 34: 개발자를 위한 Amazon Lightsail Deep-Dive

{ "instance": { "name": "reinvent", ... "privateIpAddress": "172.1.1.1", "publicIpAddress": "1.2.3.4", ... "state": { "code": 16, "name": "running" }, "username": "ubuntu", "sshKeyName": "LightsailDefaultKeyPair" }}

state.name running publicIpAddress

Page 35: 개발자를 위한 Amazon Lightsail Deep-Dive

SSH key• key pair

• key pair

• key pair

Page 36: 개발자를 위한 Amazon Lightsail Deep-Dive

key pair $ aws lightsail \ --query 'privateKeyBase64' \ --output text \ download-default-key-pair > ~/.ssh/lightsail.pem \ && chmod 400 ~/.ssh/lightsail.pem

Page 37: 개발자를 위한 Amazon Lightsail Deep-Dive

$ ssh -i ~/.ssh/lightsail.pem [email protected]

Page 38: 개발자를 위한 Amazon Lightsail Deep-Dive

• CLI

$ aws lightsail \ create-instance-snapshot \ --instance-name reinvent \ --instance-snapshot-name reinvent-snapshot

Page 39: 개발자를 위한 Amazon Lightsail Deep-Dive

$ aws lightsail \ delete-instance \ --instance-name reinvent

Page 40: 개발자를 위한 Amazon Lightsail Deep-Dive

• ssh, http (https )

• Lightsail AWS EC2 , Elastic IP, ,

• VPC Lightsail AWS VPC (RDS )

• EBS Lightsail ? X

Page 41: 개발자를 위한 Amazon Lightsail Deep-Dive

?• EC2 EC2

• EC2 VPS Lightsail

• Lightsail

• , Lightsail

• CLI ID Lightsail

Page 42: 개발자를 위한 Amazon Lightsail Deep-Dive

• https://amazonlightsail.com/docs/#faq• AWS re:Invent 2016: NEW LAUNCH! Introducing Amazon Lightsail

(CMP206)• https://youtu.be/lpBRxoNrhhc

• Amazon Lightsail – (VPS) • https://aws.amazon.com/ko/blogs/korea/amazon-lightsail-the-

power-of-aws-the-simplicity-of-a-vps/