How to log errors into S3 bucket

Hi,

I would like to setup logger that will log errors into specific S3 bucket. Obviously I’m gonna use [ExAws](https://github.com/CargoSense/ex_aws) to do so, but I’m wonder how would you do same thing.

I started looking at logger_file_backend, but it allows log into static file on the instance, not into S3 bucket. I’m thinking about running external process - agent, genserver - whatever, to send my file into S3 bucket for fixed period of time eg. each 10 minutes.

Do you think is there any better idea to do so?
Also- what in case when instance is down?

I would like to setup logger that will log errors into specific S3 bucket. Obviously I’m gonna use ExAws to do so, but I’m wonder how would you do same thing.

https://aws.amazon.com/blogs/aws/cloudwatch-log-service/ :grinning:

HTH!

1 Like

I would not recommend doing this from within your application itself. You’d be much better off running your application as a System.d service, and then just using one of the million options for pushing system.d logs to AWS cloudwatch logs.

1 Like