Take a look at this Jenkins Plugin: https://plugins.jenkins.io/slave-status/
It'll expose a healthcheck endpoint + other information like memory on port 3141 (you can configure a custom port). You can then ping that healthcheck endpoint and send the data to CloudWatch.
Terraform Provisioners are a last resort, so I'd encourage you to think about other options first.
In this case, your example suggests that you're already using cloud-init and so if at all possible I'd suggest modifying that cloud-init configuration to include a request to install the package you want to install. If you are using the cloud-config YAML format ...