A Python script for managing EC2 instances and querying CloudWatch Logs.
Make sure you have Python installed on your system.
-
Clone this repository:
git clone https://github.com/your-username/aws-ec2-logs-manager.git
-
Navigate to the cloned directory:
cd aws-ec2-logs-manager
-
Replace the placeholder values in the script with your actual AWS credentials, region, instance ID, and log group name.
-
Run the script using Python:
python aws.py {start|stop}
Replace
{start|stop}
with the action you want to perform on your EC2 instance.
- Python 3.x
- boto3 library (install using
pip install boto3
) - AWS account with appropriate permissions for EC2 and CloudWatch Logs