Capturing Client-Side Logs in an Angular App on AWS

I built an Angular application with key frontend functionalities and need to log client-side events. The app is hosted using AWS services like S3 and CloudFront, while the backend is powered by a Node.js service implemented with Lambda functions. What approach should I take to store these frontend logs, perhaps using CloudWatch, or is there a better alternative? I’m new to this, so any simple guidance would be much appreciated.

Considering the architecture involved, a good approach is to route client-side logs to a dedicated API endpoint that collects these events. This endpoint can be implemented using a lightweight Lambda function that writes logs to a datastore such as DynamoDB or even forwards them to an external logging service. From personal experience, decoupling client-side logging from CloudWatch reduces noise in system metrics and improves the ease of querying user behavior. This method also simplifies scaling and analysis without overloading CloudWatch with frontend logs.

hey, try sending logs through a kinesys firehose straight to s3 and then query via athena. it avoids clogging cloudwatch and scales well in angular apps. might require a bit extra setup but works fine

hey, i wonder if using api gateway to buffer log events for lambda processing might be cool? it could smooth things out, but how do u guys handle latency when logs spike?