[GH-ISSUE #309] Feature Request: Support Amazon Simple Notification Service #235

Closed
opened 2026-02-25 23:41:43 +03:00 by kerem · 9 comments
Owner

Originally created by @chiyiliao on GitHub (Dec 3, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/309

Thank you for develop a great tool for monitor crontab.
Here I have a feature request.
Is it possible to support Amazon Simple Notification Service?
https://aws.amazon.com/sns

Thank you!

Originally created by @chiyiliao on GitHub (Dec 3, 2019). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/309 Thank you for develop a great tool for monitor crontab. Here I have a feature request. Is it possible to support Amazon Simple Notification Service? https://aws.amazon.com/sns Thank you!
kerem closed this issue 2026-02-25 23:41:43 +03:00
Author
Owner

@cuu508 commented on GitHub (Dec 3, 2019):

Thanks for the suggestion!

I guess this could almost be achieved with the standard webhook integration, if not for the signatures in the Authorization header that AWS requires, right?

When setting up the integration, would the user be supplying ARN, access key, secret key and message body? And the task of the integration would be to construct a correctly signed request to AWS, and fire it off?

<!-- gh-comment-id:561069173 --> @cuu508 commented on GitHub (Dec 3, 2019): Thanks for the suggestion! I guess this could almost be achieved with the standard webhook integration, if not for the signatures in the Authorization header that AWS requires, right? When setting up the integration, would the user be supplying ARN, access key, secret key and message body? And the task of the integration would be to construct a correctly signed request to AWS, and fire it off?
Author
Owner

@chiyiliao commented on GitHub (Dec 4, 2019):

Thanks for your reply.

I'm not sure is it can be achieved with standard webhook integration.
I always sent SNS by official python library. I have no idea how to generate Authorization header for the request.

When using AWS boto3 library, just call below method outside AWS machine:
response = boto3.client('sns', aws_access_key_id=key_id, aws_secret_access_key=secret_key, aws_session_token=token).publish(TopicArn=arn, Subject=subject, Message=message)

or call below method in AWS EC2 machine, it will get credentials according to AWS mechanism automatically.
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html

response = boto3.client('sns').publish(TopicArn=arn, Subject=subject, Message=message)

<!-- gh-comment-id:561461754 --> @chiyiliao commented on GitHub (Dec 4, 2019): Thanks for your reply. I'm not sure is it can be achieved with standard webhook integration. I always sent SNS by official python library. I have no idea how to generate Authorization header for the request. When using AWS boto3 library, just call below method outside AWS machine: response = boto3.client('sns', aws_access_key_id=key_id, aws_secret_access_key=secret_key, aws_session_token=token).publish(TopicArn=arn, Subject=subject, Message=message) or call below method in AWS EC2 machine, it will get credentials according to AWS mechanism automatically. https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html response = boto3.client('sns').publish(TopicArn=arn, Subject=subject, Message=message)
Author
Owner

@cuu508 commented on GitHub (Dec 4, 2019):

Yes, boto3 is definitely an option. AWS also has a code sample on how to do signing – this could be used to avoid introducing the boto3 dependency: https://docs.aws.amazon.com/code-samples/latest/catalog/python-signv4-v4-signing-get-post.py.html

When setting up the integration, would the user be supplying ARN, access key and secret key? Or are you thinking about self-hosted installations and installation-wide AWS credentials?

<!-- gh-comment-id:561546807 --> @cuu508 commented on GitHub (Dec 4, 2019): Yes, boto3 is definitely an option. AWS also has a code sample on how to do signing – this could be used to avoid introducing the boto3 dependency: https://docs.aws.amazon.com/code-samples/latest/catalog/python-signv4-v4-signing-get-post.py.html When setting up the integration, would the user be supplying ARN, access key and secret key? Or are you thinking about self-hosted installations and installation-wide AWS credentials?
Author
Owner

@chiyiliao commented on GitHub (Dec 5, 2019):

It sounds good if remove boto3 dependency.

Base on my experience, user should provide ARN, region, access key and secret key when the service hosted in IDC. But only need to provide ARN when the service hosted in AWS. It depends on where the service hosted.

It also could be work when user supply ARN, region, access key and secret key in AWS environment, but it will miss out on the benefits of AWS Role.

<!-- gh-comment-id:561974708 --> @chiyiliao commented on GitHub (Dec 5, 2019): It sounds good if remove boto3 dependency. Base on my experience, user should provide ARN, region, access key and secret key when the service hosted in IDC. But only need to provide ARN when the service hosted in AWS. It depends on where the service hosted. It also could be work when user supply ARN, region, access key and secret key in AWS environment, but it will miss out on the benefits of AWS Role.
Author
Owner

@cuu508 commented on GitHub (Dec 5, 2019):

Are you self-hosting Healthchecks? On a self-hosted installations, Healthchecks already supports Apprise integration, which in turn supports SNS notifications.

<!-- gh-comment-id:561976912 --> @cuu508 commented on GitHub (Dec 5, 2019): Are you self-hosting Healthchecks? On a self-hosted installations, Healthchecks already supports Apprise integration, which in turn [supports SNS notifications](https://github.com/caronc/apprise/wiki/Notify_sns).
Author
Owner

@chiyiliao commented on GitHub (Dec 5, 2019):

Yes, I'm trying self-hosting Healthchecks.
Got it, thank you very much.

<!-- gh-comment-id:562005895 --> @chiyiliao commented on GitHub (Dec 5, 2019): Yes, I'm trying self-hosting Healthchecks. Got it, thank you very much.
Author
Owner

@marier-nico commented on GitHub (Apr 26, 2020):

Hey, I came across this issue hoping to find a way to do this on the non self-hosted version of Healthchecks! Would it be possible to add an integration for this? As @cuu508 mentioned above, it's not possible to do with the standard webhook integration because of the signatures AWS requires, and I'm not currently looking to self-host Healthchecks. 😄

<!-- gh-comment-id:619633884 --> @marier-nico commented on GitHub (Apr 26, 2020): Hey, I came across this issue hoping to find a way to do this on the non self-hosted version of Healthchecks! Would it be possible to add an integration for this? As @cuu508 mentioned above, it's not possible to do with the standard webhook integration because of the signatures AWS requires, and I'm not currently looking to self-host Healthchecks. :smile:
Author
Owner

@cuu508 commented on GitHub (Apr 27, 2020):

Not sure about adding a SNS integration at this time. My two main concerns with it are:

  • considerable effort to implement (especially if we want customizable payloads, variable replacements like in webhook integration)
  • Healthchecks would need to store AWS credentials for publishing messages. Inevitably there will be cases where users enter their root credentials, instead of using IAM and fine-grained permissions

Perhaps a solution here is to use AWS Lambda: you could write a lambda function that posts a message to a SNS topic. The Lambda function then can be called with a simple webhook. You would also have full control over how the the message payload is constructed.

<!-- gh-comment-id:619783300 --> @cuu508 commented on GitHub (Apr 27, 2020): Not sure about adding a SNS integration at this time. My two main concerns with it are: - considerable effort to implement (especially if we want customizable payloads, variable replacements like in webhook integration) - Healthchecks would need to store AWS credentials for publishing messages. Inevitably there will be cases where users enter their root credentials, instead of using IAM and fine-grained permissions Perhaps a solution here is to use AWS Lambda: you could write a lambda function that posts a message to a SNS topic. The Lambda function then *can* be called with a simple webhook. You would also have full control over how the the message payload is constructed.
Author
Owner

@marier-nico commented on GitHub (Apr 27, 2020):

Ahh yeah that totally makes sense actually. Now that you mention that, I have to agree that it's probably for the best not to add an integration!

I really like the solution to use AWS Lambda though, thanks for pointing it out! I don't know why I didn't think of it myself, seems obvious in retrospect now 😅

<!-- gh-comment-id:619967640 --> @marier-nico commented on GitHub (Apr 27, 2020): Ahh yeah that totally makes sense actually. Now that you mention that, I have to agree that it's probably for the best not to add an integration! I really like the solution to use AWS Lambda though, thanks for pointing it out! I don't know why I didn't think of it myself, seems obvious in retrospect now :sweat_smile:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#235
No description provided.