Monitoring Amazon Config with Amazon EventBridge - Amazon Config
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Monitoring Amazon Config with Amazon EventBridge

Amazon EventBridge delivers a near real-time stream of system events that describe changes in Amazon resources. Use Amazon EventBridge to detect and react to changes in the status of Amazon Config events.

You can create a rule that runs whenever there is a state transition, or when there is a transition to one or more states that are of interest. Then, based on rules you create, Amazon EventBridge invokes one or more target actions when an event matches the values you specify in a rule. Depending on the type of event, you might want to send notifications, capture event information, take corrective action, initiate events, or take other actions.

Before you create event rules for Amazon Config, however, you should do the following:

Amazon EventBridge format for Amazon Config

The EventBridge event for Amazon Config has the following format:

{ "version": "0", "id": "cd4d811e-ab12-322b-8255-872ce65b1bc8", "detail-type": "event type", "source": "aws.config", "account": "111122223333", "time": "2018-03-22T00:38:11Z", "region": "us-east-1", "resources": [ resources ], "detail": { specific message type } }

Creating Amazon EventBridge Rule for Amazon Config

Use the following steps to create an EventBridge rule that triggers on an event emitted by Amazon Config. Events are emitted on a best effort basis.

  1. In the navigation pane, choose Rules.

  2. Choose Create rule.

  3. Enter a name and description for the rule.

    A rule can't have the same name as another rule in the same Region and on the same event bus.

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

  5. For Event source, choose Amazon events or EventBridge partner events.

  6. (Optional) For Sample event type, choose Amazon events.

  7. (Optional) For Sample events, choose the event type that triggers the rule:

  8. For Creation method, choose Use pattern form.

  9. For Event source, choose Amazon services.

  10. For Amazon service, choose Config.

  11. For Event type, choose the event type that triggers the rule:

  12. Choose Any message type to receive notifications of any type. Choose Specific message type(s) to receive the following types of notifications:

    • If you choose ConfigurationItemChangeNotification, you receive messages when the configuration of a resource that Amazon Config evaluates has changed.

    • If you choose ComplianceChangeNotification, you receive messages when the compliance type of a resource that Amazon Config evaluates has changed.

    • If you choose ConfigRulesEvaluationStarted, you receive messages when Amazon Config starts evaluating your rule against the specified resources.

    • If you choose ConfigurationSnapshotDeliveryCompleted, you receive messages when Amazon Config successfully delivers the configuration snapshot to your Amazon S3 bucket.

    • If you choose ConfigurationSnapshotDeliveryFailed, you receive messages when Amazon Config fails to deliver the configuration snapshot to your Amazon S3 bucket.

    • If you choose ConfigurationSnapshotDeliveryStarted, you receive messages when Amazon Config starts delivering the configuration snapshot to your Amazon S3 bucket.

    • If you choose ConfigurationHistoryDeliveryCompleted, you receive messages when Amazon Config successfully delivers the configuration history to your Amazon S3 bucket.

  13. If you chose a specific event type from the Event Type dropdown list, choose Any resource type to make a rule that applies to all Amazon Config supported resource types.

    Or choose Specific resource type(s), and then type the Amazon Config supported resource type (for example, AWS::EC2::Instance).

  14. If you chose a specific event type from the Event Type dropdown list, choose Any resource ID to include any Amazon Config supported resource ID.

    Or choose Specific resource ID(s), and then type the Amazon Config supported resource ID (for example, i-04606de676e635647).

  15. If you chose a specific event type from the Event Type dropdown list, choose Any rule name to include any Amazon Config supported rule.

    Or choose Specific rule name(s), and then type the Amazon Config supported rule (for example, required-tags).

  16. For Select target(s), choose the type of target you have prepared to use with this rule, and then configure any additional options required by that type.

  17. The fields displayed vary depending on the service you choose. Enter information specific to this target type as needed.

  18. For many target types, EventBridge needs permissions to send events to the target. In these cases, EventBridge can create the IAM role needed for your rule to run.

    • To create an IAM role automatically, choose Create a new role for this specific resource.

    • To use an IAM role that you created earlier, choose Use existing role.

  19. (Optional) Choose Add target to add another target for this rule.

  20. (Optional) Enter one or more tags for the rule. For more information, see Amazon EventBridge tags.

  21. Review your rule setup to make sure it meets your event-monitoring requirements.

  22. Choose Create to confirm your selection.