Automated Alerts: Stay Informed When New Resources Emerge on Your AWS Account
OverView :-
In the dynamic landscape of cloud computing, keeping a vigilant eye on newly created resources is a key aspect of robust AWS management. Imagine getting real-time notifications delivered to your email inbox whenever a new resource sprouts up in your AWS account. In this guide, we’ll explore an automated solution using AWS services to ensure you’re promptly informed about any changes.
Pre-requestites :-
- An AWS account with required permissions.
Procedure --
Step-1 :- Login to your Aws account & navigate to Aws Config service. and Create a Config Recorder with your required resource types.After the Config is being created click on settings and check whether the recording is on.(u should see the below output)
Step-2 :- Open SNS service & create a Topic and subscription with protocol as Email to send the alerts through emails.
Step-3 :- Now Navigate to the Event Bridge service and create an EventBridge rule with an event pattern that discovers when new resources are created in the account.
- Click on create rule and name the rule then Choose the Rule type as Rule with an event pattern and click on Next.
2. For Event source, choose AWS events or EventBridge partner events.
3. Choose Event source as AWS services and Service as Config in the Event Pattern.Also select the Event type as Config Configuration Item Change from the drop down menu.As per your requirements chose the Event Type Specifications and the resources for which u want to get notified when new resources gets created on specific services.
Choose Next.
4. For Target types, select AWS service.
5. For Select a target, choose SNS topic.
6. For Topic, choose your SNS topic which is being created using Step-2.
7. Expand Additional settings. Then, for Configure target input, choose Input transformer from the drop down menu.
8. Click on Configure input transformer. Then, under Target input transformer for the Input Path text box, enter the following example path:
{
"awsRegion": "$.detail.configurationItem.awsRegion",
"awsAccountId": "$.detail.configurationItem.awsAccountId",
"resource_type": "$.detail.configurationItem.resourceType",
"resource_ID": "$.detail.configurationItem.resourceId",
"configurationItemCaptureTime": "$.detail.configurationItem.configurationItemCaptureTime"
}
9. For the Template text box, enter the following example template:
"On <configurationItemCaptureTime> AWS Config service recorded a creation of a new <resource_type> with Id <resource_ID> in the account <awsAccountId> region <awsRegion>. For more details open the AWS Config console at https://console.aws.amazon.com/config/home?region=<awsRegion>#/timeline/<resource_type>/<resource_ID>/configuration"
10. Choose Confirm. Then, choose Next.
11. Optionally, you can Add new tag. Then, choose Next.
12. Choose Create rule.
13. If an event type is initiated, then you receive an SNS email notification with the custom fields populated from Point 9 similar to the following:
Conclusion:-
Enhance your AWS monitoring capabilities and maintain an up-to-the-minute awareness of your cloud infrastructure. With automated alerts, you’re not just managing resources; you’re orchestrating a proactive and responsive cloud strategy. Empower your AWS experience with timely notifications and unparalleled control.Stay informed, stay in control! 🚀📧 #AWS #CloudManagement #Automation #Alerts #DevOps.