This Project hosts a web server and then automates certain maintenance tasks.
- Install awscli
- Configure aws with Access Key ID and Secret access key
- It first checks if apache server is installed, in case not, installs it and ensures apache2 server is active and enabled.
- Tar file of apache2 access logs and error logs according to timestamp is then added to /tmp directory and added to s3 bucket.
- inventory.html is created to serve as a web page to get the metadata of the archived logs.
- The final script is then automated and scheduled to run everyday using cronjob.