Cimpress-MCP / serilog-sinks-awscloudwatch

A Serilog sink that logs to AWS CloudWatch
Apache License 2.0
67 stars 54 forks source link

Missing Error Message for Missing logs:DescribeLogGroups Permission in Serilog Configuration for AWS CloudWatch #144

Open joshua-classen opened 1 week ago

joshua-classen commented 1 week ago

I'm currently configuring Serilog to log to AWS CloudWatch, and my code should automatically create a new log group. My AWS user has the necessary permissions to create a log group, but no log group was created, and no exception was thrown.

After a long troubleshooting process, I discovered that the logs:DescribeLogGroups permission also needs to be added to the policy for Serilog to function properly. Once I added this permission, logging to CloudWatch started working, and the log group was created as expected.

However, no error message was thrown indicating that the logs:DescribeLogGroups permission was missing. It would be very helpful if an error could be added to indicate when this permission is lacking, so that future users can resolve this configuration issue more quickly.

Thank you for considering this improvement!

wparad commented 1 week ago

I don't even think describe is required anymore if it is being used, we'd more than accept a PR to remove that usage.