Using PowerShell to manage AWS Service

384

get-ec2instance

  1. Create ec2 instance:

New-EC2Instance -ImageId <AMI_ID> -KeyName <Key_Name> -SecurityGroups launch-wizard-1 -InstanceType m3.medium

Modify instance:

$instance1 = Get-EC2Instance -Filter @{Name = “reservation-id”; Values = “<ReservationID>”}

Delete instance:

Stop-EC2Instance $instance1 –Terminate

 

2. Create SNS

Publish-SNSMessage -TopicArn <ARN_Value> -Message “Sample Message” -Region us-west-2