LAB Amazon EC2 Windows Instances
LAB Amazon EC2 Windows Instances
Let's get started with Amazon Elastic Compute Cloud (Amazon EC2) by launching, connecting to, and using a Windows instance. An instance is a virtual server in the AWS cloud. With Amazon EC2, you can set up and configure the operating system and applications that run on your instance.
- Launch an Window instance
- Connect to Window Instance
- Cleanup your instance
Step 1: Launch an Instance
- You can launch a Windows instance using the AWS Management Console as described in the following procedure.
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- From the console dashboard, choose Launch Instance.
- The Choose an Amazon Machine Image (AMI) page displays a list of basic configurations, called Amazon Machine Images (AMIs), that serve as templates for your instance. Select the AMI for Windows Server 2016 Base or Windows Server 2012 R2 Base. Notice that these AMIs are marked "Free tier eligible."
- On the Choose an Instance Type page, you can select the hardware configuration of your instance. Select the micro type, which is selected by default. Notice that this instance type is eligible for the free tier.
- Choose Review and Launch to let the wizard complete the other configuration settings for you.
- On the Review Instance Launch page, under Security Groups, you'll see that the wizard created and selected a security group for you.
- On the Review Instance Launch page, choose Launch.
- When prompted for a key pair, select Choose an existing key pair, then select the key pair that you created when getting set up.
- Alternatively, you can create a new key pair. Select Create a new key pair, enter a name for the key pair, and then choose Download Key Pair. This is the only chance for you to save the private key file, so be sure to download it. Save the private key file in a safe place. You'll need to provide the name of your key pair when you launch an instance and the corresponding private key each time you connect to the instance.
- When you are ready, select the acknowledgement check box, and then choose Launch Instances.
- A confirmation page lets you know that your instance is launching. Choose View Instances to close the confirmation page and return to the console.
- On the Instances screen, you can view the status of the launch. It takes a short time for an instance to launch. When you launch an instance, its initial state is pending. After the instance starts, its state changes to running and it receives a public DNS name. (If the Public DNS (IPv4) column is hidden, choose Show/Hide Columns (the gear-shaped icon) in the top right corner of the page and then select Public DNS (IPv4).)
- It can take a few minutes for the instance to be ready so that you can connect to it. Check that your instance has passed its status checks; you can view this information in the Status Checks
Step 2: Connect to Your Instance
To connect to your Windows instance using an RDP client
- In the Amazon EC2 console, select the instance, and then choose Connect.
- In the Connect To Your Instance dialog box, choose Get Password (it will take a few minutes after the instance is launched before the password is available).
- Choose Browse and navigate to the private key file you created when you launched the instance. Select the file and choose Open to copy the entire contents of the file into the Contents.
- Choose Decrypt Password. The console displays the default administrator password for the instance in the Connect To Your Instance dialog box, replacing the link to Get Password shown previously with the actual password.
- Record the default administrator password, or copy it to the clipboard. You need this password to connect to the instance.
- Choose Download Remote Desktop File. Your browser prompts you to either open or save the .rdp file. You may get a warning that the publisher of the remote connection is unknown. You can continue to connect to your instance.
- When prompted, log in to the instance, using the administrator account for the operating system and the password that you recorded or copied previously. If your Remote Desktop Connection already has an administrator account set up, you might have to choose the Use another account option and type the user name and password manually.
- Due to the nature of self-signed certificates, you may get a warning that the security certificate could not be authenticated. Use the following steps to verify the identity of the remote computer, or simply choose Yes or Continue to continue if you trust the certificate.
- If you are using Remote Desktop Connection from a Windows PC, choose View certificate. If you are using Microsoft Remote Desktop on a Mac, choose Show Certificate.
- Choose the Details tab, and scroll down to the Thumbprint entry on a Windows PC, or the SHA1 Fingerprints entry on a Mac. This is the unique identifier for the remote computer's security certificate.
Step 3: Clean Up Your Instance
In the navigation pane, choose Instances. In the list of instances, select the instance.
- Choose Actions, Instance State, Terminate.
- Choose Yes, Terminate when prompted for confirmation.
Amazon EC2 shuts down and terminates your instance. After your instance is terminated, it remains visible on the console for a short while, and then the entry is deleted.