Amazon EventBridge and AWS CloudTrail
As you record CloudTrail events, you may wish to react to certain specific event types by triggering a Lambda function or sending out a notification alert. In this case, you can integrate Amazon EventBridge with CloudTrail to react to specific API calls made by an AWS service, which is recorded by AWS CloudTrail.
For example, you may wish to trigger an email alert generated by Amazon SNS to notify an administrator whenever a user stops an EC2 instance. This design architecture can be configured as per the diagram in Figure 16.9.
Figure 16.9 – EventBridge and CloudTrail integration
To configure this architecture, you will need to create a CloudTrail trail, which can be created using the Management Console or CLI. As part of creating a trail, you must create or choose an existing Amazon S3 bucket to store your log files in. The following screenshot illustrates an example trail that depicts the bucket location...