Hi,
I have a simple script which will create an EC2 instance in AWS cloud...Below is my script...
Set-AWSCredentials -AccessKey myaccesskey -SecretKey mysecretid
Set-DefaultAWSRegion us-east-1
$myPSKeyPair = New-EC2KeyPair -KeyName Mykeypair
New-EC2SecurityGroup -GroupName mysecuitygroup -GroupDescription "mysecuritygroup"
New-EC2Instance -ImageId ami-xxxxxx -MinCount 1 -MaxCount 1 -KeyName Mykeypair -SecurityGroups mysecuritygroup -InstanceType t1.micro
After the instance created I want to tag the newly created instance...
What is the possible solution...How can I get the instance id of the newly created instance automatically?
Or, how can I write the reservation id into a log file for the newly created instance so that then using the reservation id I can find the instance id and I can tag the newly created instance...
- Changed type Sudheesh M A Friday, February 28, 2014 9:17 AM


