awslabs / landing-zone-accelerator-on-aws

Deploy a multi-account cloud foundation to support highly-regulated workloads and complex compliance requirements.
https://aws.amazon.com/solutions/implementations/landing-zone-accelerator-on-aws/
Apache License 2.0
541 stars 431 forks source link

Budget Reports unable to generate a notification alert. #218

Closed balapraneethreddy98 closed 4 months ago

balapraneethreddy98 commented 1 year ago

Describe the bug When configuring BudgetReport, the notification option provides us to generate alerts and forward that to the corresponding configured method, for example (email), but when configured and executed via the code pipeline, the budgets are created but no sign of the alerts associated with the budgets.

To Reproduce

  1. Deploy the Landing zone accelerator using the following guide and IaaC templates Link: https://aws.amazon.com/solutions/implementations/landing-zone-accelerator-on-aws/
  2. Navigate to CodeCommit Service and aws-accelator-config repo.
  3. Edit global-config.yml file as mentioned below.

Expected behavior Create an alert notification when deployed.

Version: [v1.4.2]

reports:
  budgets:
  - name: sandbox_root-budget-name
    timeUnit: MONTHLY
    type: COST
    amount: 500
    includeUpfront: true
    includeTax: true
    includeSupport: true
    includeSubscription: true
    includeRecurring: true
    includeOtherSubscription: true
    includeDiscount: true
    includeCredit: false
    includeRefund: false
    useBlended: false
    useAmortized: false
    unit: USD
    notification:
    - type: FORECASTED
      thresholdType: PERCENTAGE
      threshold: 100
      comparisonOperator: GREATER_THAN
      subscriptionType: EMAIL
      address: example-email@gmail.com
    deploymentTargets:
      organizationalUnits:
        - Root

Screenshots -> Screenshot of no alerts being created after deployment of the global-config.yml code.

MicrosoftTeams-image (2)

richardkeit commented 1 year ago

Hi @balapraneethreddy98 ,

If you click on the View all alerts or scroll down - what do you see?

image

Calls out I would check is around name (the budget deployed doesn't match) and whether you're in the Management account based on the deployment targets

niranjansm commented 1 year ago

You had the config wrong. Can you please correct it to reflect as below?

      notifications:
        - type: ACTUAL
           thresholdType: PERCENTAGE
           threshold: 90
           comparisonOperator: GREATER_THAN
           subscriptionType: EMAIL
           address: email@email.com

I have tested this and it works (the alerts are created). However, if you first create the budget (without notification alert) and then add the notification alert as an update, the stack update fails! That however is an issue!

Can you confirm this is what is happening in your case (or not) ?