Lambda Logshipper
How can you easily move your Cloudwatch logstream to another platform or log collector endpoints? The easiest way is to ship the Cloudwatch logstream through a socket client. This is an example of a small Golang lambda function to ship aws cloudwatch log stream to a tcp endpoint.
you will need a socket client:
N.B. SocketClient is easy for shipping the data. But maybe not the most secured way. Adding a tls cert might be a better idea 😃. Also it is better to use the os.Getenv("TCP_SERVER_ENDPOINT")
and os.Getenv("PORT")
.
You will also need a go client for Cloudwatch to recieve and parse the incoming messages.
Please feel free to 👉📱message my twilio bot +447479275693. I will come back to you shortly 😃. You can find the source code here
Read other posts