Guardian 0.11.4

The 0.11.4 release of Guardian introduces the ability to create alarms on specific aliases on a lambda function.

Previously, alarms for lambda functions were created on the lambda function irrespective of any aliases on the lambda, this caused issues where a alarms would fire when the dev alias of a lambda function encountered errors due to the inability to distinguish between dev/prod aliases etc.

Guardian now detected the presence of an alias within the resource id and creates the alarm specifically on the lambda alias.

Example

  1. We start with 2 lambda functions, NormalFunction and FunctionWithAlias which has two alias Dev and Prod.
  2. We deploy guardian with the following alarms.yaml template:
Resources:
  Lambda:
  - Id: NormalFunction
  - Id: FunctionWithAlias:Dev

Observe that the resource id for FunctionWithAlias targets only the Dev alias whilst NormalFunction has no alias target as such remains the same as before.

  1. Observe the created LambdaErrors alarms in Cloudwatch. Observe that the Dev alias is targeted in the FunctionWithAlias alarm.
    Example Notification
  2. We then trigger a Lambda error in the NormalFunction and FunctionWithAlias Prod alias which we are not monitoring.
Normal Function FunctionWithAlias (Prod Alias)
Example Notification
Example Notification
  1. Observe that the LambdaErrors alarm has triggered for NormalFunction as expected. Also observe it did not trigger of FunctionWithAlias as expected as the error occurred in the Prod alias but we are monitoring the Dev alias.

    Example Notification
  2. Now we trigger a lambda error in the FunctionWithAlias lambda on the Dev alias.

    Example Notification

  3. Observe the alarm for the FunctionWithAlias has triggered for the error induced on the Dev alias as expected.

    Example Notification