1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
1
I think this is what you are looking for: Setting up notifications or trigger actions based on Parameter Store events.
Another solution is to simply use Cron on the instances to check the parameter store value periodically.
You can use AWS Config and Systems Manager to monitor the inventory on the instance. See:
- Track file changes on Systems Manager managed instances with AWS Config
- Viewing inventory history and change tracking
I have not personally set this up for instances but it is the closest thing I could find.
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 9 Monaten
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 7 Monaten
- AWS OFFICIALAktualisiert vor 2 Jahren
Parameter Store event-based triggers seems the way to go here indeed, and as OP mentions, they could also do the check on SSM to assure compliance and/or trigger the same action in case of a non-compliant resource.
Thank you for your suggestions. I can see how setting up notifications or trigger actions based on Parameter Store events, or using cron jobs to check the parameter store value periodically, could be useful for ensuring the parameter value is correctly propagated to the file on the instances.
However, my primary concern is not changes to the parameter value itself, but changes to the file on the instances' filesystems. Specifically, I want to be notified if the file is modified or deleted, and have a mechanism in place to automatically restore the file to its intended state.
I am aware that I could potentially use a Linux package, like audit, to monitor the file, but ideally, I would like to achieve this through an AWS service, if possible. This way, the monitoring and remediation process would be managed entirely through AWS, rather than having a separate mechanism on the instance itself.
Is there an AWS service or feature that could monitor a specific file on an EC2 instance and trigger a specified action if the file is modified or deleted?