System Operations on Aws-lab 1w-creating EC2 (Windows)

Source: Internet
Author: User

1. Create a Commandhost instance, log in to Commandhost, and create a webserver instance from the AWS Cli.

1.1 Creating an IAM role for a commandhost instance

1.2 Creating an Commandhost instance

1.3 Creating a security group for webserver instances

1.4 Connecting to Commandhost instances

1.5 Configuring the AWS CLI

1.6 Creating an Webserver instance

1.6.1 Download UserData Script

(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 Creating a new instance

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 '

1.6.3 to tag new instances (Name=webserver)

AWS EC2 Create-tags--resources i-87e89b40--tags ' Key=name,value=webserver '

1.6.4 checking whether a new instance was created successfully

AWS EC2 Describe-instances--instance-ids I-87E89B40

1.6.5 Display new instance status information only

AWS EC2 Describe-instances--instance-ids I-87E89B40--query ' reservations[0]. Instances[0]. State.name '

1.6.6 Check for new instance DNS name

AWS EC2 Describe-instances--instance-ids I-87E89B40--query ' reservations[0]. Instances[0]. Publicdnsname '

1.6.7 access validation from a local browser

System Operations on Aws-lab 1w-creating EC2 (Windows)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.