Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nasa-gcn/gcn-email
A service to consume alerts from the GCN Kafka broker and send emails to users who subscribe through the GCN web site
https://github.com/nasa-gcn/gcn-email
astronomy aws docker email kafka python
Last synced: about 6 hours ago
JSON representation
A service to consume alerts from the GCN Kafka broker and send emails to users who subscribe through the GCN web site
- Host: GitHub
- URL: https://github.com/nasa-gcn/gcn-email
- Owner: nasa-gcn
- License: other
- Created: 2022-08-08T17:11:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T03:04:26.000Z (7 months ago)
- Last Synced: 2024-04-12T11:13:59.990Z (7 months ago)
- Topics: astronomy, aws, docker, email, kafka, python
- Language: Python
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 5
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# gcn-email
A hosted listener service to consume alerts from the GCN Kafka broker and send emails to users who subscribe through the new GCN site.
## Configuration
The following environment variables may be used to configure the service:
| Name | Value |
| -------------------- | ---------------------------------------------------------------------------------- |
| `AWS_DEFAULT_REGION` | AWS region, e.g. `us-east-1` |
| `KAFKA_*` | Kafka client configuration as understood by [Confluent Platform docker containers] |
| `EMAIL_SENDER` | Address to be used as the sender for emails sent through SES |## IAM Policy
The following is the minimum AWS IAM policy to grant the necessary permissions to this service. Replace `` with the AWS region (e.g. `us-east-1`), `` with the AWS account ID, `` with the verified SES domain (e.g. `test.gcn.nasa.gov`), and `` with the SES configuration set.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ses:SendEmail",
"ses:SendRawEmail"
],
"Resource": [
"arn:aws:ses:::identity/",
"arn:aws:ses:::configuration-set/"
],
"Effect": "Allow"
},
{
"Action": [
"ses:GetSendQuota"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ssm:GetParameter"
],
"Resource": "arn:aws:ssm:::parameter/RemixGcnProduction/tables/email_notification_subscription",
"Effect": "Allow"
},
{
"Action": [
"dynamodb:Query"
],
"Resource": "arn:aws:dynamodb:::table/RemixGcnProduction-EmailNotificationSubscriptionTable-*",
"Effect": "Allow"
}
]
}
```[Confluent Platform docker containers]: https://docs.confluent.io/platform/current/installation/docker/config-reference.html
## How to contribute
This package uses [Poetry](https://python-poetry.org) for packaging and Python virtual environment management. To get started:
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) and [clone](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository) this repository.
2. Install Poetry by following [their installation instructions](https://python-poetry.org/docs/#installation).
3. Install this package and its dependencies by running the following command inside your clone of this repository:
poetry install --all-extras
4. Run the following command to launch a shell that is preconfigured with the project's virtual environment:
poetry shell