Notes / AWS / Scripts

Scripts

AWS PowerShell scripts for inventory, clean-up, governance, network and data security, and operations, with documentation and safe-use guidance.

Scripts

Every script has built-in help (Get-Help .\Script.ps1 -Full). Reports are read-only; scripts that make changes support -WhatIf.

Inventory and clean-up

Know what you have, and find what you're paying for but not using.

  • Find-AwsOrphanedResources

    Finds orphaned AWS resources that cost money or clutter: unattached EBS volumes, unused Elastic IPs, idle load balancers and more.

  • Get-AwsEC2Inventory

    Lists every EC2 instance in every enabled region, with type, state, IPs, volumes, IMDS setting and tags.

Governance

Credential hygiene and tagging across every account.

  • Get-AwsIamCredentialReport

    Reports IAM users and the root user from the IAM credential report, and flags the risky ones: no MFA, old or unused access keys.

  • Get-AwsUntaggedResources

    Lists AWS resources that are missing required tags, or have them spelled with the wrong case.

Network and data security

Open ports and public S3 buckets.

  • Get-AwsSecurityGroupReport

    Reports security group rules in every region and flags the risky ones, such as SSH or RDP open to the internet.

  • Get-AwsS3PublicAccessReport

    Checks every S3 bucket for public access, and reports Block Public Access, policy status, ACLs, encryption and versioning.

Operations

Backup coverage and scheduled start/stop.

  • Get-AwsBackupCoverage

    Shows which EC2 instances, RDS databases, DynamoDB tables and EFS file systems are protected by AWS Backup, and which aren't.

  • Invoke-AwsEC2PowerSchedule

    Starts or stops EC2 instances that carry a schedule tag. Run it on a schedule from EC2, Lambda or Systems Manager.