|
Project Information
Links
|
Power-EC2Dream is a C# interface to Amazon EC2 and S3 (and Eucalyptus) that can be used from PowerShell to write scripts against Amazon EC2 (and Eucalyptus). The PowerShell scripting shell and language is the strategic direction for Microsoft Scripting. There are an increasing number of scripts available so it should be the best tool for configurating Windows Servers in Amazon EC2. ExamplesShow the running instances: $ec2 = new-object Amazon.EC2.PowerEC2Dream($env:AMAZON_ACCESS_KEY_ID,$env:AMAZON_SECRET_ACCESS_KEY) $res = $ec2.DescribeInstances() For ease of scripting parameters are passed as strings and return values are typically hashtables: Show the attributes of a particular image: $ec2 = new-object Amazon.EC2.PowerEC2Dream($env:AMAZON_ACCESS_KEY_ID,$env:AMAZON_SECRET_ACCESS_KEY)
$res = $ec2.DescribeImages(@("ami-7ac02713"))
write-host $res[0].Keys
foreach ($r in $res)
{
write-host $r.Values
}PowerShell Installationa. Download Powershell 1.0 from http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspxchoosing either the 32 bit or 64 bit version depending if you will be running a small or large Windows 2003 Server instance. b. Download PowerShell Community Extensions from http://pscx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=2688 as it provides some useful utilities. c. If you require a zip utility download and install 7-Zip from http://www.7-zip.org/download.html choosing either the 32 bit(7z465.exe) or 64 bit version (7z465-x64.msi) depending if you will be running a small or large Windows 2003 Server instance. d. Install the above on your local machine you run powershell EC2 scripts locally or in your Amazon EC2 instances to runthe scripts in the servers. |