Tag Archives: report

Generate an EC2 instance report using PowerShell…

In AWS, under the EC2 instances view, you can customize the details you want to see about your EC2 instances, however once you do that there is no way of generating a CSV based EC2 instance report using the AWS UI. Plus you don’t have the option of displaying properties such as the VPC or Subnet name – which is a little annoying as working with long ids can get difficult. To make the reporting process a little easier, I put together the script below – which generates a CSV based report.

NOTE – The resulting CSV report is extremely detailed – you can simply remove properties you feel are unnecessary for your reporting purposes.

Before you can run this script install the AWS PowerShell Modules.

 Install-Module -Name AWSPowerShell

Then I would recommend creating an access key profile in the SDK store – by running the following in PowerShell.

Set-AWSCredentials -AccessKey AccessKey -SecretKey SecretKey -StoreAs ProfileName

And to make things easier maybe associate a region with that profile.

Initialize-AWSDefaultConfiguration -ProfileName ProfileName -Region eu-central-1
Continue reading