A Python command-line application for managing AWS networking resources using boto3 and LocalStack.
- 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
- 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- Python 3
- Docker
- Docker Compose
- Running LocalStack
docker compose -f localstack/docker-compose.yml up -ddocker compose -f localstack/docker-compose.yml downdocker compose -f localstack/docker-compose.yml restartpip install -r src/requirements.txtYou can use the provided script:
./run.shSome 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.