Home

Awesome

AWS Toolbox header

AWS Toolbox šŸ§°

Scripts and tools for AWS cloud automation.

Overview

This repository contains scripts for AWS Developers, DevOps Engineers, and Cloud Architects. Tools focus on task automation and infrastructure management.

Usage

Navigate to the relevant AWS service section. Click on the script name in the table below to open the content and usage instructions.

[!TIP] Struggling with AWS complexity or stuck on-premise? Let's transform your cloud journey.

Schedule a call with me to find out how I can enhance your existing AWS setup or guide your journey from on-premise to the Cloud.

<details><summary>ā˜ļø <strong>Discover more about my one-person business: Towards the Cloud</strong></summary> <br/>

Hi, I'm Danny ā€“ AWS expert and founder of Towards the Cloud. With over a decade of hands-on experience, I specialized myself in deploying well-architected, highly scalable and cost-effective AWS Solutions using Infrastructure as Code (IaC).

When you work with me, you're getting a package deal of expertise and personalized service:

My mission is simple: I'll free you from infrastructure headaches so you can focus on what truly matters ā€“ your core business.

Ready to unlock the full potential of AWS Cloud?

<a href="https://towardsthecloud.com/contact"><img alt="Schedule your call" src="https://img.shields.io/badge/schedule%20your%20call-success.svg?style=for-the-badge"/></a>

</details>

AWS Service Management Scripts

This collection includes Python and Bash scripts for managing various AWS services. The scripts are organized by service for easy navigation.

CategoryScript NameDescription
AppStreamappstream_delete_image.pyUnshares AppStream image, then deletes it
CloudFormationcfn_delete_stackset.pyDeletes stackset and associated instances
CloudWatchcw_count_log_groups.pyCounts the total number of CloudWatch log groups in an AWS account
CloudWatchcw_delete_log_groups.pyDeletes log groups based on age
CloudWatchcw_fetch_log_groups_with_creation_date.pyFetches log groups with creation date
CloudWatchcw_set_retention_policy.pySets retention policy for log groups
CodePipelinecp_slack_notifications.pyEnables notifications on Slack
EC2ec2_delete_unattached_volumes.pyDeletes unattached EBS volumes
EC2ec2_delete_orphaned_snapshots.pyDeletes snapshots that are not associated with any volumes
EC2ec2_delete_ssh_access_security_groups.pyDeletes SSH (port 22) inbound rules from all security groups
EC2ec2_delete_unused_amis.pyDeletes unused AMIs (Amazon Machine Images) in an AWS account
EC2ec2_delete_unused_eips.pyDeletes unused Elastic IPs
EC2ec2_delete_unused_keypairs_all_regions.pyDeletes unused EC2 keypairs in all regions
EC2ec2_delete_unused_keypairs_single_region.pyDeletes unused EC2 keypairs in a single region
EC2ec2_delete_tagged_security_groups.pyDeletes tagged security groups
EC2ec2_find_unattached_volumes.pyFinds unattached EBS volumes
EC2ec2_asg_ssh.shSSH wrapper for Auto Scaling group instances
EC2ec2_list_available_eips.shLists unassociated Elastic IPs
EC2ec2_request_spot_instances.shRequests spot instances
EC2ec2_resize_volume.shResizes EBS volume
ECSecs_delete_inactive_task_definitions.pyDeletes inactive ECS task definitions
ECSecs_publish_ecr_image.shPublishes Docker image to ECR
EFSefs_delete_tagged_filesystems.pyDeletes tagged EFS and mount targets
IAMiam_delete_user.pyDeletes IAM users
IAMiam_identity_center_create_users.pyCreate IAM Identity Center (SSO) users
IAMiam_rotate_access_keys.pyRotates IAM user keys
IAMiam_assume_role.shAssumes IAM role
Organizationsorg_assign_sso_access_by_ou.pyAssigns SSO access for accounts in an OU
Organizationsorg_import_users_to_sso.pyImports users/groups to AWS SSO
Organizationsorg_list_accounts_by_ou.pyLists accounts in an OU
Organizationsorg_list_sso_assignments.pyLists SSO assignments for accounts
Organizationsorg_remove_sso_access_by_ou.pyRemoves SSO access for accounts in an OU
S3s3_create_tar.pyCreates tar files
S3s3_delete_empty_buckets.pyDeletes empty S3 buckets
S3s3_list_old_files.pyLists old files in S3
S3s3_search_bucket_and_delete.pyDeletes S3 bucket and its contents
S3s3_search_file.pySearches for files in S3 bucket
S3s3_search_key.pySearches for a key in S3 bucket
S3s3_search_multiple_keys.pySearches for multiple keys in S3 bucket
S3s3_search_subdirectory.pySearches subdirectories in S3
SSMssm_delete_parameters.shDeletes SSM parameters
SSMssm_import_parameters.shImports SSM parameters
Generaldelete_unused_security_groups.pyDeletes unused security groups
Generalaws_cli_aliases.shAWS CLI command aliases
Generaltag_secrets_manager_secrets.pyTags Secrets Manager secrets
Generalmulti_account_command_executor.pyRuns commands across multiple AWS accounts

AWS Tools and Utilities

This section lists tools that enhance AWS usage across console, CLI, and APIs.

EC2

ECS

IAM

Infrastructure as Code

Lambda

S3

Security

SSM

Miscellaneous


Contributors

This project exists thanks to all the people who contribute.

Code Contributors

See how you can contribute to this repository.

Author

Danny Steenman