User guide

Note
Alternatively, connect using the Toolkit for Visual Studio (as described in Connecting to an
Amazon EC2 Instance in the AWS Toolkit for Visual Studio User Guide) and then copy the files
from your local drive to the instance. The Remote Desktop session is automatically configured
so that your local drives are available to the instance.
To run the sample program on the EC2 instance
1. Open the Amazon EC2 console.
2. Get the password for your EC2 instance as follows:
a. In the navigation pane, click Instances. Select the instance, and then click Connect.
b. In the Connect To Your Instance dialog box, click Get Password. (It will take a few minutes
after the instance is launched before the password is available.)
c. Click Browse and navigate to the private key file you created when you launched the instance.
Select the file and click Open to copy the entire contents of the file into contents box.
d. Click 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.
e. Record the default administrator password, or copy it to the clipboard.You need this password
to connect to the instance.
3. Connect to your EC2 instance as follows:
a. Click Download Remote Desktop File. When your browser prompts you to do so, save the
.rdp file.When you have finished, you can click Close to dismiss the Connect To Your Instance
dialog box.
b. Navigate to your downloads directory, right-click the .rdp file, and then select Edit. On the
Local Resources tab, under Local devices and resources, click More. Select Drives to make
your local drives available to your instance, and then click OK.
c. Click Connect to connect to your instance.You may get a warning that the publisher of the
remote connection is unknown.
d. Log in to the instance as prompted, using the default Administrator account and the default
administrator password that you recorded or copied previously.
Sometimes copying and pasting content can corrupt data. If you encounter a "Password Failed"
error when you log in, try typing in the password manually. For more information, see Connecting
to Your Windows Instance Using RDP and Troubleshooting Windows Instances in the Amazon
EC2 User Guide for Microsoft Windows Instances.
4. Copy both the program and the AWS assembly (AWSSDK.dll) from your local drive to the instance.
5. Run the program and verify that it succeeds because it uses the credentials provided by the IAM
role.
Retrieving (GET) an object
Version v2.0.0
111
AWS SDK for .NET Developer Guide
Tutorial: Using an IAM Role