+86 13541016684Mon. - Fri. 10:00-22:00

System Operations on AWS – Creating EC2 (Windows)教程

System Operations on AWS - Creating EC2 (Windows)教程

System Operations on AWS – Creating EC2 (Windows)教程

582266-20160305134204049-1933424326

1. 创建CommandHost实例,登录到CommandHost,通过AWS CLI创建WebServer实例。

1.1 为CommandHost实例创建一个IAM角色

582266-20160305134849455-1566126184

582266-20160305135025596-1717970971

 

582266-20160305135201190-1003439201

582266-20160305135257409-1586137348

582266-20160305135350252-2115208960

582266-20160305135437971-108428009

1.2 创建CommandHost实例

582266-20160305135616065-1756901432

582266-20160305135812924-1380670446

582266-20160305140020830-587547858

582266-20160305140114424-1239540659

582266-20160305140318096-1055899265

582266-20160305140545705-1922066444

582266-20160305140635159-1899269751

582266-20160305140732034-1471473970

582266-20160305141019377-464968370

582266-20160305141102174-984702553

582266-20160305141155330-1283851407

582266-20160305141344987-1696705420

582266-20160305142002518-2074955672

1.3 为WebServer实例创建一个安全组

582266-20160305142341455-1487271152

582266-20160305142413346-1597628277

582266-20160305142531362-154805354

582266-20160305142808455-1775693068

1.4 连接到CommandHost实例

582266-20160305143015846-563403206

582266-20160305143118127-1404963044

582266-20160305143208409-1958717998

582266-20160305143357315-468437479

1.5 配置AWS CLI

582266-20160305144702580-1065949300

1.6 创建WebServer实例

1.6.1 下载UserData脚本

1
(new-object net.webclient).DownloadFile('https://d2lrzjb0vjvpn5.cloudfront.net/sys-ops/v2.4/lab-1-compute-windows/static/UserData.txt', 'C:\temp\UserData.txt')

1.6.2 创建一个新实例

1
aws ec2 run-instances --image-id ami-df8767bf --user-data file://c:\temp\UserData.txt --key-name qwikLABS-L1033-414091 --security-group-ids sg-eebb3c89 --instance-type t2.medium --subnet-id subnet-e2837a86 --associate-public-ip-address --query 'Instances[*].InstanceId'

582266-20160305144809784-1331346879

1.6.3 给新实例打标签(Name=WebServer)

1
aws ec2 create-tags --resources i-87e89b40 --tags 'Key=Name,Value=WebServer'

1.6.4 检查新实例是否创建成功

1
aws ec2 describe-instances --instance-ids i-87e89b40

1.6.5 只显示新实例状态信息

1
aws ec2 describe-instances --instance-ids i-87e89b40 --query 'Reservations[0].Instances[0].State.Name'

1.6.6 检查新实例DNS名字

1
aws ec2 describe-instances --instance-ids i-87e89b40 --query 'Reservations[0].Instances[0].PublicDnsName'

582266-20160305145733127-781937988

1.6.7 从本地浏览器访问验证

582266-20160305145956440-81398656