Canada Work Permit: Firts year tax return in Canada

All about your tax return Unless you resided in Canada all year, you also need one or more of the following publications Newcomers to Canada 2012 – I assume this document doesn’t apply for you if you are staying in Canada by using Work Permit. This pamphlet is for you if you left another countryContinue reading “Canada Work Permit: Firts year tax return in Canada”

Terminate EC2 Spot/On-Demand instance by name

Declare function to terminate instance by Id function ec2-terminate-instance($instid){ $ec2.TerminateInstances((new-object Amazon.EC2.Model.TerminateInstancesRequest).WithInstanceId($instid)).TerminateInstancesResult.TerminatingInstance[0]} Get instance by name and terminate it $filter = (new-object Amazon.EC2.Model.Filter).WithName(‘tag:Name’).WithValue(‘YourInstanceName’) (Get-EC2Instance -Filter $filter -Region ‘us-east-1’).RunningInstance | % { ec2-terminate-instance $_.InstanceId }

New-ASLaunchConfiguration with IAM Role

This post is good addition to my previous post Schedule your Amazon EC2 spot instance startup time. You can slightly modify call to New-ASLaunchConfiguration cmdlet to use the powerfull IAM roles feature. New-ASLaunchConfiguration Fitnesse -ImageId ami-00000000 -IamInstanceProfile Fitnesse -SecurityGroups Fitnesse -InstanceType t1.micro -SpotPrice 0.011

Schedule your Amazon EC2 spot instance startup time

Here I want to explain how to start your Amazon EC2 instance recurrently by scheduling. I have used the AWS Tools for Windows PowerShell. You can use java command line or python library. The main goal is to explain the idea: I am going to automate the starting of my Fitnesse server. Create launch configurationContinue reading “Schedule your Amazon EC2 spot instance startup time”

Installing AWS Tools for Windows PowerShell through PowerShell

AWS Tools for Windows PowerShell (new-object System.Net.WebClient).DownloadFile(‘http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi’, ‘c:\downloads\AWSToolsAndSDKForNet.msi’) (start c:\downloads\AWSToolsAndSDKForNet.msi ‘/qn’ -wait -PassThru).ExitCode