Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Tools Collection

A comprehensive collection of tools for AWS infrastructure management, including Terraform provisioning, service discovery, and cleanup utilities.

Project Structure

aws-tools/
├── applications/          # Sample applications for deployment
│   ├── backend/          # Spring Boot backend application
│   ├── frontend/         # React frontend application
│   └── nginx/            # NGINX configuration and source
├── delete-services/      # AWS resource cleanup utilities
│   ├── delete.py         # Python script to delete AWS resources
│   └── resources_to_delete.csv  # CSV template for resource deletion
├── list-services/        # AWS service discovery tools
│   ├── list_services.py  # Python script to list active AWS services
│   ├── run_key_services.sh  # Script using AWS access keys
│   ├── run_sso_services.sh  # Script using AWS SSO
│   └── AWS_Active_Services_Select.csv  # Service catalog
└── terraform/            # Infrastructure as Code
    ├── main.tf           # Main Terraform configuration
    ├── variables.tf      # Terraform variables
    ├── outputs.tf        # Terraform outputs
    ├── modules/          # Reusable Terraform modules
    └── applications/     # Application-specific Terraform configs

Features

1. Terraform Infrastructure Provisioning

  • Complete AWS Infrastructure: EKS cluster, ECR repositories, S3 buckets with CDN
  • Monitoring Stack: Prometheus, Grafana, Loki, Tempo
  • CI/CD Tools: Jenkins, SonarQube
  • Database: PostgreSQL RDS
  • Container Registry: ECR with automated image building and pushing

2. AWS Service Discovery

  • Service Listing: Python script to detect active AWS services in your account
  • Dual Authentication: Support for both AWS access keys and SSO
  • Comprehensive Coverage: EC2, ECS, ECR, S3, DynamoDB, Lambda, RDS, and more

3. Resource Cleanup

  • Safe Deletion: Script to delete AWS resources with proper cleanup procedures
  • Multiple Services: CloudFront, S3, Lambda, DynamoDB, SQS, ECR, and more
  • CSV Template: Structured input for specifying resources to delete

4. Sample Applications

  • Backend: Spring Boot application with Docker support
  • Frontend: React application with Docker and NGINX configuration
  • NGINX: Reverse proxy configuration for microservices

Quick Start

Prerequisites

  • AWS CLI configured with appropriate permissions
  • Terraform v1.0+ installed
  • Python 3.8+ with boto3 library
  • Docker for image building

Terraform Deployment

  1. Initialize Terraform:

    cd terraform/
    terraform init
  2. Review Plan:

    terraform plan
  3. Apply Configuration:

    terraform apply

Service Discovery

Using AWS Access Keys:

cd list-services/
./run_key_services.sh

Using AWS SSO:

cd list-services/
./run_sso_services.sh

Resource Cleanup

  1. Prepare CSV File: Edit resources_to_delete.csv with resources to remove

  2. Run Cleanup:

    cd delete-services/
    python delete.py

Terraform Modules

The project includes reusable Terraform modules for:

  • ECR: Elastic Container Registry with automated image lifecycle policies
  • EKS: Kubernetes cluster with managed node groups
  • S3 + CloudFront: Static website hosting with CDN
  • RDS PostgreSQL: Managed PostgreSQL database
  • Monitoring: Prometheus, Grafana, Loki, Tempo stack
  • CI/CD: Jenkins and SonarQube for continuous integration

Configuration

AWS Authentication

Access Key Method:

aws configure
# Enter AWS Access Key ID, Secret Access Key, region, and output format

SSO Method:

aws sso login
# Follow the browser authentication flow

Environment Variables

Set the following variables for Terraform:

export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
export AWS_REGION="us-east-1"

Security Considerations

  • Least Privilege: Ensure IAM roles have minimal required permissions
  • Secrets Management: Use AWS Secrets Manager or environment variables for sensitive data
  • Network Security: Configure security groups and VPC settings appropriately
  • Resource Cleanup: Always review resources before deletion to avoid accidental data loss

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes and test thoroughly
  4. Submit a pull request with detailed description

License

This project is licensed under the MIT License - see the LICENSE files in individual directories for details.

Support

For issues and questions:

  1. Check existing documentation in each subdirectory
  2. Review Terraform plan output for configuration issues
  3. Ensure AWS credentials have appropriate permissions
  4. Verify network connectivity to AWS services

About

AWS Python utils

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages