Monitoring Application Cost Profiler events in EventBridge - Application Cost Profiler

Monitoring Application Cost Profiler events in EventBridge

You can use Amazon EventBridge to automate your AWS services and respond automatically to system events, such as application availability issues or resource changes. Events from AWS services are delivered to EventBridge in near-real time. You can write simple rules to indicate which events are of interest to you and which automated actions to take when an event matches a rule. For more information, see Amazon EventBridge User Guide.

You can monitor AWS Application Cost Profiler events in EventBridge. EventBridge routes that data to targets such as AWS Lambda and Amazon Simple Notification Service (Amazon SNS). These events are the same as those that appear in Amazon CloudWatch Events, which delivers a near-real-time stream of system events that describe changes in AWS resources.

Monitor report generation with EventBridge

With EventBridge, you can create rules that define actions to take when Application Cost Profiler sends notification of a report being generated. For example, you can create a rule that sends you an email message each time a report is generated.

To monitor for report generation

  1. Log in to AWS using an account that has permissions to use both EventBridge and Application Cost Profiler.

  2. Open the Amazon EventBridge console at https://console.aws.amazon.com/events/.

  3. Using the following values, create an EventBridge rule that monitors events created when a report is generated:

    • For Rule type, choose Rule with an event pattern.

    • For Event source, choose Other.

    • In the Event pattern section, choose Custom patterns (JSON editor), and then paste the following event pattern into the text area:

      { "source": ["aws.application-cost-profiler"], "detail-type": ["Application Cost Profiler Report Generated"] }
    • For Target types, choose AWS service, and for Select a target, choose the AWS service that you want to act when EventBridge detects an event of the selected type. The target is triggered when an event is received that matches the event pattern defined in the rule.

    For details about creating rules, see Creating Amazon EventBridge rules that react to events in the Amazon EventBridge User Guide.

Example of a Report Generated event

This event informs you when a report is generated and ready for you to retrieve. The message field gives you the Amazon Simple Storage Service (Amazon S3) bucket and key for the Amazon S3 object where the report is stored.

{ "version": "0", "id": "01234567-EXAMPLE", "detail-type": "Application Cost Profiler Report Generated", "source": "aws.application-cost-profiler", "account": "123456789012", "time": "2021-03-31T10:23:43Z", "region": "us-east-1", "resources": [], "detail": { "message": "Application Cost Profiler report delivered in bucket: SampleBucket, key: SampleReport-112233445566" } }