aws / aws/aws-appsync-community
Custom CloudWatch log group name
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Hello everybody!
First of all, thank you for creating such an amazing service. AppSync saved us a lot of time and money while not having to implement CRUD operations ourselves with custom code and so much more.
**Issue:**
We are running several AppSync APIs in the same AWS region and heavily using CloudWatch logs to debug, operate, and proactively inspect our API usage. One of the biggest challenges in those activities has been so far distinguishing between different log groups created by AppSync in CloudWatch.

Since AppSync uses only the identifier without the API name, it is very hard to choose the right log group. This problem appears across multiple AWS services as well, where we are inspecting those logs as well. For example XRay and CloudWatch Log Insights.
Currently, according to the [CloudFormation documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html), there is no way to customize the name or use a custom log group.
**Proposed solutions:**
I am sure there are some internal constraints as well as preferences on how to name log groups. Without the knowledge of those, let me list a few possible solutions that would solve our problem:
1. Automatically add the API name to the log group name like it can be seen for example in lambdas: `/aws/lambda/backend-production-WebhookCallerFunction-K6Iabcd4sQoo`
2. Allow a custom name or at least a prefix/postfix by defining for example `LogGroupName` in the [LogConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html) object.
3. Allow linking a custom log group by ARN for example by `CloudWatchLogGroupArn`.
Forgive me if I am overlooking something. I tried to google solutions to this problem for quite a while and would appreciate any help in this area.
**References:**
Several users of the [Serverless Framework](https://github.com/sid88in/serverless-appsync-plugin/issues/268) have the same issue as well.
Thank you!
Contributor guide
Research direction
No repository files, tests, or implementation entry points are mentioned. Start by reviewing the CloudFormation LogConfig documentation and the existing AppSync community issue context; done would mean defining and implementing a supported way to distinguish or customize AppSync CloudWatch log group names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql
- Domain
- cloud, observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100