Skip to content

Latest commit

 

History

History
85 lines (69 loc) · 1.73 KB

File metadata and controls

85 lines (69 loc) · 1.73 KB

Cloud Resource Manager

A Python command-line application for managing AWS networking resources using boto3 and LocalStack.

Features

  • Create and manage Virtual Private Clouds (VPCs)
  • Create and manage Subnets
  • Create and manage Internet Gateways
  • Allocate and release Elastic IPs
  • Create and manage NAT Gateways
  • Create and manage Route Tables
  • Create and manage Route Table Rules
  • Interactive command-line menu
  • Unit tests using pytest and unittest.mock
  • AWS emulation with LocalStack
  • Technologies

Technologies

  • Python 3
  • boto3
  • LocalStack
  • Docker
  • pytest
  • unittest.mock

Project Structure

src/
├── cloud/
│   └── network/
│       ├── vpc.py
│       ├── subnet.py
│       ├── internet_gateway.py
│       ├── elastic_ip.py
│       ├── nat_gateway.py
│       ├── route_table.py
│       └── route_table_rule.py
├── menu/
└── cloudmgr.py

Requirements

  • Python 3
  • Docker
  • Docker Compose
  • Running LocalStack

Start LocalStack:

docker compose -f localstack/docker-compose.yml up -d

Stop LocalStack:

docker compose -f localstack/docker-compose.yml down

Restart LocalStack:

docker compose -f localstack/docker-compose.yml restart

Installation

Install the project dependencies:

pip install -r src/requirements.txt

Running the Application

You can use the provided script:

./run.sh

Notes

Some AWS resources depend on others. For example:

  • A Subnet must belong to a VPC.
  • A NAT Gateway requires an Elastic IP and a Subnet.
  • Route Table Rules require an existing Route Table.

The project uses LocalStack, so no real AWS account or cloud resources are required.