Before
Teams likely had to retrieve the required tag list, review EC2 instances individually, and compare each instance's tags against the expected requirements. They then had to notify stakeholders, apply missing tags, and provide a follow-up status update manually.
How it works
- Start from the email-triggered event, retrieve the required tags, and collect the available EC2 instances.
- Process each instance, retrieve its details, and check whether it is missing any required tag.
- Notify the designated Slack channel, apply the required tags to affected resources, and update the notification when tagging is complete.
Workflow details
- Trigger and requirements: The workflow starts when an email-triggered event is received, then retrieves the required tag definitions that should be applied to EC2 instances.
- Instance discovery: It gathers the available EC2 instances and processes them individually so each instance can be evaluated against the required tagging rules.
- Compliance check: The workflow retrieves additional information for each instance, expands the required tag data, and uses a condition to determine whether an instance is missing any required tag.
- Notification and remediation: When missing tags are identified, the workflow sends a notification to a designated Slack channel and attaches the required tags to the affected EC2 resources.
- Status confirmation: After the tagging action, it updates the original Slack message to indicate that the required tags have been attached successfully.
What changed
Tag compliance checking, notification, remediation, and status reporting now occur in one triggered workflow. The Slack channel receives the initial finding and the subsequent completion update without requiring a person to coordinate each handoff.
Work removed
Reviewing EC2 instances one by one, comparing their tags with the required tag list, identifying missing tags, manually notifying the Slack channel, applying tags to affected resources, and posting a completion update.
Expected outcome
A repeatable automated process for identifying and correcting missing EC2 tags, removing several manual review, notification, tagging, and follow-up actions from each run.
