Fork me on GitHub
#aws
<
2020-04-24
>
souenzzo15:04:04

What are the options for logging clojure into aws? logback appender to s3? logback appender to cloudwatch?

👀 4
viesti15:04:44

run stuff via ECS and just println JSON 🙂

4
viesti15:04:03

docker log driver will then push stdout/stderr to cloudwatch, cloudwatch parses the json even

viesti15:04:01

that is if you'r in dockerlandia

souenzzo17:04:27

@viesti I'm running in EC2 and I can't change that (there is no c5 class in ECS) I'm right that I want something like a appender to cloudwatch service. but still looking for possible implementations

viesti17:04:22

hmm, if you can install cloudwatch agent (or Fluentbit) to the machine, then you could log to a file and let the agent tail it and push to CloudWatch

viesti17:04:31

seems that there are multiple logback appenders for cloudwatch (google brought up com.j256.cloudwatchlogbackappender/cloudwatchlogbackappender for example), I haven't used them but they might also be of use

viesti17:04:38

extra log shipping agent might sound a bit much, but then again, that puts the error handling of pushing logs to a remote service, out from the JVM of the application

viesti17:04:52

on ECS, I'd think that just running the ECS agent and configuring the cluster it checks into should make the box available to ECS, but yeah, there's more to it if the application isn't on docker (and might be more stuff I don't know about)

orestis18:04:47

Amazon is doing something for Elastic Beanstalk, I think installing the cloud watch agent?

valtteri18:04:35

CloudWatch Agent is simple to install and it comes with a nice wizard that creates the config file for you. You can tell it which log files you want to start tailing.

valtteri18:04:46

And yes, I think Beanstalk uses CloudWatch agent as well