Skip to content

Commit

Permalink
feat: add email sender functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtoj committed Mar 23, 2024
1 parent c3ce609 commit d6125b1
Show file tree
Hide file tree
Showing 5 changed files with 256 additions and 107 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ located within its directory.

## Features

- Deploy a [custom SMS sender Lambda function for AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html)
- Customizable Open Policy Agent (OPA) policy to filter and throttle SMS sending
- Ability to dynamically use SMS sender ID and short code
- [Custom SMS sender Lambda function for AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html)
- Customizable (OPA) policy to filter and throttle SMS sending
- Ability to dynamically use SMS sender ID and short code
- [Custom Email sender Lambda function for AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-email-sender.html)
- Dyanmic decided which SES template to use based on context of request.

## Usage

Expand All @@ -25,6 +27,9 @@ module "cognito_custom_sms_sender" {
source = "cruxstack/cognito-custom-message-sender/aws"
version = "x.x.x"
email_sender_enabled = true
email_sender_policy_content = "<OPA policy content>"
sms_sender_enabled = true
sms_sender_policy_content = "<OPA policy content>"
sms_sender_throttle_period_in_minutes = 15
Expand All @@ -42,6 +47,8 @@ for more details on these variables.
|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:---------:|:--------:|
| `kms_key_alias_prefix` | The prefix for the KMS key alias. It must start with 'alias' and only include alphanumeric characters, dashes, underscores, colons or slashes, but doesn't end with a slash. | `string` | `"alias"` | no |
| `service_log_level` | The log level for the service. It must be one of 'debug', 'info', 'warn', 'error', 'panic' or 'fatal'. | `string` | `"info"` | no |
| `email_sender_enabled` | Whether or not the eamil sender is enabled. | `bool` | `false` | no |
| `email_sender_policy_content` | The content of the Open Policy Agent policy for email sender. It must include the string 'package cognito_custom_sender_email_policy'. | `string` | n/a | yes |
| `sms_sender_enabled` | Whether or not the SMS sender is enabled. | `bool` | `false` | no |
| `sms_sender_policy_content` | The content of the Open Policy Agent policy for SMS sender. It must include the string 'package cognito_custom_sender_sms_policy'. | `string` | n/a | yes |
| `sms_sender_throttle_period_in_minutes` | The throttle period for the SMS sender, in minutes. It must be a positive integer. | `number` | `15` | no |
Expand Down
1 change: 1 addition & 0 deletions assets/custom-email-sender
Submodule custom-email-sender added at 09df8b
Loading

0 comments on commit d6125b1

Please sign in to comment.