Skip to main content

A powerful tool for restoring EC2 instances from AMIs

Project description

EC2 Restore Tool

A command-line tool for restoring EC2 instances from AMIs, with support for both full instance restore and volume-level restore.

Features

  • Full instance restore from AMI
  • Volume-level restore from AMI
  • Preserves network interfaces and private IPs
  • Interactive CLI with rich progress indicators
  • Detailed restoration reports
  • Support for multiple instances
  • Backup of instance metadata before restore

Installation

pip install ec2-restore

Configuration

Create a config.yaml file with your AWS credentials and restore settings:

aws:
  profile: default  # AWS profile name
  region: us-west-2  # AWS region

restore:
  max_amis: 10  # Maximum number of AMIs to show
  log_file: logs/ec2_restore.log  # Log file path
  log_level: INFO  # Logging level

Usage

Full Instance Restore

ec2-restore --instance-id i-1234567890abcdef0

Volume Restore

ec2-restore --instance-id i-1234567890abcdef0 --restore-type volume

Restore by Instance Name

ec2-restore --instance-name my-instance

Restore Multiple Instances

ec2-restore --instance-ids i-1234567890abcdef0,i-0987654321fedcba0

Options

  • --instance-id: EC2 instance ID to restore
  • --instance-name: EC2 instance name (tag) to restore
  • --instance-ids: Comma-separated list of EC2 instance IDs to restore
  • --config: Path to configuration file (default: config.yaml)

Development

  1. Clone the repository:
git clone https://github.com/yourusername/ec2-restore.git
cd ec2-restore
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ec2_restore-1.0.0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ec2_restore-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ec2_restore-1.0.0.tar.gz.

File metadata

  • Download URL: ec2_restore-1.0.0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ec2_restore-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2cfa8755b3b3aa104569e746dc1a038fe72e6e3e97a7cb8fa8ca79b4b3ea01a4
MD5 2760c9c54e18a866cc1c68f47b02b90f
BLAKE2b-256 832bdcb95ab0522819635f755e33cbe18d10c2146461056ee60e9fdae5b389d3

See more details on using hashes here.

File details

Details for the file ec2_restore-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ec2_restore-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ec2_restore-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e7cc13655ec325612d73bdc27a4829a7e857893cdf2e9a8e650de96fac9d2d7
MD5 becc26a56c951a0250f0079de751379f
BLAKE2b-256 f43862a30fad421ddbba63e3f424c63e1729276e2b8a03b7f55df48f96d76d7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page