ACloudGuru / serverless-plugin-aws-alerts

A Serverless Framework plugin that creates CloudWatch alarms for functions.
MIT License
531 stars 149 forks source link

Add support for external API Gateway in the dashboards #215

Open lucasvieirasilva opened 2 years ago

lucasvieirasilva commented 2 years ago

This is a Feature Proposal

Description

Currently, this plugin uses the stage and service name to build the API gateway name.

Code reference: https://github.com/ACloudGuru/serverless-plugin-aws-alerts/blob/master/src/dashboards/widgets/api-gw/requests/numbers.js#L2

But will be nice to support API gateway created externally.

In the alarms configuration section the apiName could be an optional property, like this:

custom:
  alerts:
    dashboards: true
    dashboardConfig: 
      apiName: 'my-custom-api-gateway-name'