如何创建计费警报/警报以通知AWS数据传输限制?

时间:2017-03-10 10:52:02

标签: amazon-web-services amazon-ec2

我想在跨越某些指定的费用/数据限制时为AWS资源创建结算提醒。

2 个答案:

答案 0 :(得分:1)

AWS管理控制台可以为AWS服务的支出和使用创建budgets and forecasts

AWS Budets and Forecasts

当预测或实际支出超过预算的特定比例时(例如50%,80%,100%),可以配置电子邮件提醒。

答案 1 :(得分:0)

这是示例CloudFormation资源,用于创建结算/预算提醒。

  Resources:
    MonthlyBudget:
      Type: "AWS::Budgets::Budget"
      Properties:
        Budget:
          BudgetName: Monthly
          BudgetType: COST
          TimeUnit: MONTHLY
          BudgetLimit:
            Amount: 100
            Unit: USD
        NotificationsWithSubscribers:
          - Notification:
              NotificationType: ACTUAL
              ComparisonOperator: GREATER_THAN
              Threshold: 80 # 1st alert sent when % of Monthly total is spent.
            Subscribers:
              - SubscriptionType: EMAIL
                Address: email@example.com
          - Notification:
              NotificationType: ACTUAL
              ComparisonOperator: GREATER_THAN
              Threshold: 95 # 2nd alert sent when % of Monthly total is spent.
            Subscribers:
            - SubscriptionType: EMAIL
              Address: email@example.com