Tag Archives: ELB

Automating AWS with PowerShell

I often have to turn on instances or register them with load balancers. I had some trouble finding documentation on the AWS PowerShell modules but in the end I was able to get everything done via scripts.

Here are some examples that might help you out.

If you are not using IAM roles then you will need to pass credentials to the AWS powershell module to use. This is how you accomplish that (using least privileged IAM credentials I hope).

Query for EC2 instances by name

Power on an instance

Convert your already queried instance objects into objects that can be used with Elastic Load Balancers…

Use your ELB Instance objects to add or remove them from ELBs