Skip to content

Ras al jil feature eventbridge scheduler ses abandoned cart notification#2998

Open
ras-al-jil wants to merge 3 commits intoaws-samples:mainfrom
ras-al-jil:ras-al-jil-feature-eventbridge-scheduler-ses-abandoned-cart-notification
Open

Ras al jil feature eventbridge scheduler ses abandoned cart notification#2998
ras-al-jil wants to merge 3 commits intoaws-samples:mainfrom
ras-al-jil:ras-al-jil-feature-eventbridge-scheduler-ses-abandoned-cart-notification

Conversation

@ras-al-jil
Copy link
Copy Markdown

@ras-al-jil ras-al-jil commented Mar 17, 2026

Issue #2999, if available:

Description of changes:
This pattern demonstrates how to use Amazon EventBridge Scheduler to drive per-customer abandoned cart email notifications on an hourly cadence. A Lambda function, invoked by the scheduler, queries a DynamoDB GSI for customers with abandoned carts that have not yet been notified, sends each a personalised HTML email via Amazon SES, and marks the record as notified to prevent duplicate emails. The pattern includes idempotent notification logic, seed test data, a dead-letter queue for failed scheduler invocations, and least-privilege IAM policies scoped to the specific SES identity and DynamoDB table.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Copy Markdown
Contributor

@marcojahn marcojahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @ras-al-jil, thank you for your contribution. I've added a few comments, pls review.

Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/main.tf
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/README.md Outdated
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/README.md Outdated
```bash
terraform output
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README does not include a dedicated section for verifying that the deployment succeeded and resources were created correctly. While the Testing section covers functional testing, there is no guidance on confirming the Terraform deployment outputs, verifying the EventBridge schedule is active, or checking that the DynamoDB table was seeded correctly.

As an example:

  ## Verify Deployment

  After `terraform apply` completes, verify the resources were created:

  1. Confirm the EventBridge schedule is active:
     ```bash
     aws scheduler get-schedule --name $(terraform output -raw schedule_name)
     ```

  2. Confirm the DynamoDB table has seed data:
     ```bash
     aws dynamodb scan --table-name $(terraform output -raw dynamodb_table_name) --select COUNT
     ```
     Expected: `Count: 3`

Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/README.md
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/main.tf Outdated
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/example-pattern.json Outdated
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/example-pattern.json Outdated
Comment thread eventbridge-scheduler-ses-abandoned-cart-notification/main.tf
@ras-al-jil
Copy link
Copy Markdown
Author

Hi @marcojahn, thank you for reviewing!
I have made the suggested changes. Do let me know if this is okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants