pyEC2, a Python library for interacting with Amazon EC2 instances, to automate various tasks related to EC2 management. The automation scripts provided here can be used to perform common tasks such as instance provisioning, deployment, monitoring, and termination.
Ensure you have the following prerequisites installed:
- Python 3.x
- boto3 library (
pip install boto3
) - AWS CLI configured with necessary permissions
-
Clone the repository to your local machine:
git clone https://github.com/sidhu2003/PyEC2.git
-
Navigate to the project directory:
cd pyEC2
-
Install required Python packages:
pip install -r requirements.txt
Before running the scripts, make sure to set up your AWS credentials and configure the desired settings using aws cli
.
-
Configure AWS credentials:
Ensure that your AWS credentials are set up either by exporting them as environment variables or by using the AWS CLI
aws configure
command.
To provision EC2 instances using the configured parameters, run:
python main.py
-
Logging: The scripts utilize Python's logging module to capture runtime information and errors. Logs are stored in
pyEC2.log
. -
Error Handling: Error handling is implemented to manage exceptions that may occur during API calls or resource provisioning.
-
Security: Ensure that your AWS credentials are kept secure and not exposed in the source code or version control.
Contributions to enhance this project are welcome! Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License.
Feel free to customize this README.md
template further based on the specifics of your project and the features you've implemented. Replace placeholders with actual values and expand sections to include more detailed instructions or explanations as needed. Happy documenting!