Right now we a little over 3 gigabytes worth of logs in AWS CloudWatch from Graduate's prod and staging ECS containers. This is because we (a) log a lot of unnecessary info and (b) the logs never expire. In order to stay within the CloudWatch free tier, we should reduce this total.
Tasks
[x] Reduce the log retention time to a reasonable level (1 month seems like a reasonable retention time, but depending on how much the second step reduces logs, we could bump it up higher).
[x] Disable Graduate's debug and info logging in production (link to logging settings). You can use the NODE_ENV env variable to differentiate between production and development environments. This should reduce the size of /ecs/*-graduatenu-api logs pretty significantly.
[ ] Verify the log reduction locally by changing the env variable and upon deploy in CloudWatch. This will involve setting up the graduate repo locally, so feel free to reach out if you have any questions about that.
Summary
Right now we a little over 3 gigabytes worth of logs in AWS CloudWatch from Graduate's prod and staging ECS containers. This is because we (a) log a lot of unnecessary info and (b) the logs never expire. In order to stay within the CloudWatch free tier, we should reduce this total.
Tasks
debug
andinfo
logging in production (link to logging settings). You can use theNODE_ENV
env variable to differentiate between production and development environments. This should reduce the size of/ecs/*-graduatenu-api
logs pretty significantly.