AWS and PowerShell – Let’s be friends Part 1

I first used AWS approximately 4 years ago. At that time, programmatic management of services was not an easy hurdle to jump and required regular ‘feeding & watering’.

Naturally, these tools have matured greatly so whatever tool-set you are most comfortable with has a well developed set of features/options available for you to use. These can be referenced and downloaded from this page.

Here, I’m going to demonstrate how to setup and install the AWS Tools for PowerShell.

**Please make sure you follow good practice by creating separate, credentialed (IE NON ROOT) users. **

Download the MSI here and run with Admin creds. You can follow the bouncing ball;

……..

You’ll have a new PowerShell shortcut available;  

But it’s much tidier to simply add the import routine into your Default PS Profile by adding the following;

You are customising this with all your default modules, right ?

Load your profile and verify the module is loaded;

Now, we’ll store some Credentials into a Profile Called “Default”

Storing as Default means a “-ProfileName” parameter does not need to be specified at each execution.

Where do you get these from ? Login to the AWS console and go to the IAM console;

Click on Users, Click on the User you’re going to use and then the “Security credentials” Tab.

To create a fresh Access key ID Pair, click on Create access key.

  

Click on Show, and copy down the “Secret access key” and stow it in your password vault. Done.

Check it’s all configured, for my Admin profile.

…and a quick check that my accounts and S3Buckets are being returned,

Get-S3Bucket | Sort -Property CreationDate | ft -auto

Good to go. Now we’re in and cooking and have the power of PowerShell and AWS at our fingertips.

In Part 2 we’ll go a little deeper and get stuff done. Stay Tuned.

 

 

 

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *