serverless-appsync-plugin icon indicating copy to clipboard operation
serverless-appsync-plugin copied to clipboard

Loggroupname to be API Name instead of API-ID

Open kvr2277 opened this issue 6 years ago • 3 comments

Is there anyway to specify log group name to be AppSync's api name instead of API ID. I see this code is used to fetch the loggroupname

LogGroupName: { 'Fn::Join': ['/', ['/aws/appsync/apis', { 'Fn::GetAtt': [logicalIdGraphQLApi, 'ApiId'] }]] },

is there a way to make this API name instead. In cloudwatch - pointing at correct appsync loggroup becomes little difficult as we have to know system generated API ID to search logs.

kvr2277 avatar Aug 25 '19 17:08 kvr2277

Hi @kvr2277 sorry for late response. There is currently no way to do what you are looking for, but it would be interesting to extend the logConfig option to enable that.

bboure avatar Dec 13 '19 17:12 bboure

This seems to be a sensible suggestion. Every other serverless auto log group formation that I have seen so far names the log group after the functionality, e.g. Lambdas

akzincsystems avatar Feb 15 '21 05:02 akzincsystems

@kvr2277 @akzincsystems After looking at this in #385 this is unfortunately not possible as of now. This is a CloudFormation limitation. If you look at the AppSync LogConfig section of the doc, you'll see that there is no way to configure the destination Group name. Aws uses the Api's id by default.

Feel free to open an issue/feature request at https://github.com/aws/aws-appsync-community

I will close this issue for now.

bboure avatar Feb 15 '21 07:02 bboure