개발자를 위한 amazon lightsail deep-dive

Post on 13-Apr-2017

49 Views

Category:

Engineering

9 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Amazon Lightsail Deep-Dive

(@seapy) -

AWS re:invent 2016

, , &

Lightsail VPS

AWS EC2

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

EC2 / / ,EBS , ...

(IP, Stop, Restart)

SSH

Lightsail No-nonsense pricing?

• : $0.0067/ ($5/ )

• : $0.09/

• : $0.05/

• 20 $1

• IP : $0.005/

• DNS

• 3 DNS

• $0.40/

• $5 750

• AWS

• : 20

• IP : 5

• DNS : 3

• CLI, SDK

CLI • SSH Key

• / , / /

• /

• .

CLI •

CLI $ pip install --upgrade awscli

IAM Policy

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

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

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

$ 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" },

$ aws lightsail \ get-bundles

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

• $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

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

blueprint •

• OS wordpress

$ aws lightsail \ get-blueprints

{ "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", ...

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

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

{ "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

SSH key• key pair

• key pair

• key pair

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

$ ssh -i ~/.ssh/lightsail.pem ubuntu@1.2.3.4

• CLI

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

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

• ssh, http (https )

• Lightsail AWS EC2 , Elastic IP, ,

• VPC Lightsail AWS VPC (RDS )

• EBS Lightsail ? X

?• EC2 EC2

• EC2 VPS Lightsail

• Lightsail

• , Lightsail

• CLI ID Lightsail

• 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/

top related