Search code examples
apacheamazon-web-servicesdockeramazon-ecsamazon-efs

Preserving Apache Error Logs with Docker


What is the best practice to preserve apache eror logs inside of containers running on AWS ECS? Is EFS really the best way to do this? If so, is it even possible to access EFS files where the logs are persisted?


Solution

  • Few choices: Right choice depend on what you want to do with those log files; is it just for records or you want to take any actions on it realtime etc.

    1. You can save it on EBS volumes ( for regions where EFS is not available ) or where volume need not be connected to multiple servers.

    2. Save logs on S3

    3. Send logs on CloudWatch.

    4. Install kinesis-agent and send logs to kinesis stream in real time if you want to process these logs in real time ( probably for a dashboard ) or might be invoke an alarm.