Skip to content

Commit d6125b1

Browse files
committed
feat: add email sender functionality
1 parent c3ce609 commit d6125b1

File tree

5 files changed

+256
-107
lines changed

5 files changed

+256
-107
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ located within its directory.
1414

1515
## Features
1616

17-
- 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)
18-
- Customizable Open Policy Agent (OPA) policy to filter and throttle SMS sending
19-
- Ability to dynamically use SMS sender ID and short code
17+
- [Custom SMS sender Lambda function for AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-sms-sender.html)
18+
- Customizable (OPA) policy to filter and throttle SMS sending
19+
- Ability to dynamically use SMS sender ID and short code
20+
- [Custom Email sender Lambda function for AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-email-sender.html)
21+
- Dyanmic decided which SES template to use based on context of request.
2022

2123
## Usage
2224

@@ -25,6 +27,9 @@ module "cognito_custom_sms_sender" {
2527
source = "cruxstack/cognito-custom-message-sender/aws"
2628
version = "x.x.x"
2729
30+
email_sender_enabled = true
31+
email_sender_policy_content = "<OPA policy content>"
32+
2833
sms_sender_enabled = true
2934
sms_sender_policy_content = "<OPA policy content>"
3035
sms_sender_throttle_period_in_minutes = 15
@@ -42,6 +47,8 @@ for more details on these variables.
4247
|-----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:---------:|:--------:|
4348
| `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 |
4449
| `service_log_level` | The log level for the service. It must be one of 'debug', 'info', 'warn', 'error', 'panic' or 'fatal'. | `string` | `"info"` | no |
50+
| `email_sender_enabled` | Whether or not the eamil sender is enabled. | `bool` | `false` | no |
51+
| `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 |
4552
| `sms_sender_enabled` | Whether or not the SMS sender is enabled. | `bool` | `false` | no |
4653
| `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 |
4754
| `sms_sender_throttle_period_in_minutes` | The throttle period for the SMS sender, in minutes. It must be a positive integer. | `number` | `15` | no |

assets/custom-email-sender

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 09df8bddc10f1727af96ecc4656cb276b701a2ce

0 commit comments

Comments
 (0)