Context
The recurring deadline-reminder schedule is now provisioned entirely in infra-as-code (DataTalksClub/infra-terraform), tracked in infra-terraform#1. The old CMP shell script + manual GitHub Actions workflow have already been removed from this repo — there is nothing for CMP to provision at runtime. This issue is just a recap so the CMP side knows what to keep working.
What was provisioned in Terraform
A new file cmp_deadline_reminder.tf adds:
- An EventBridge rule running daily at 09:00 UTC (
cron(0 9 * * ? *)).
- An ECS target that launches the prod task as a one-off Fargate task, overriding the container command to:
python manage.py send_deadline_reminders
- An invocation role EventBridge assumes (
ecs:RunTask on course-management-prod:* + iam:PassRole on the execution role).
Details:
- Account
387546586013, region eu-west-1
- Cluster:
course-management-cluster
- Task family:
course-management-prod (the schedule references the family, so it always runs the latest active revision that CI/CD deploys — no pinning to a stale revision)
- Container name in override:
course-management-prod
What CMP needs to keep working
- The management command
python manage.py send_deadline_reminders must continue to exist and run to completion as a one-off task (it reconciles Datamailer recipient lists, triggers sends, and exits).
- It runs against prod env/secrets, using the shared Datamailer instance (
DATAMAILER_URL = https://datamailer.dtcdev.click, same host for dev and prod).
- If the container name in the prod task definition ever changes from
course-management-prod, the EventBridge containerOverrides[].name in cmp_deadline_reminder.tf must be updated to match — otherwise the override is silently ignored.
What does NOT need changing
- No GitHub Actions / CI involvement. The CI deploy user (
course-management-ci-cd-deploy-user) needs no scheduling permissions — no scheduler:*, iam:CreateRole, or iam:PassRole. terraform apply creates everything.
Notes
- Schedule runs once per day at 09:00 UTC. To change the cadence or time, it's a one-line edit in
cmp_deadline_reminder.tf (schedule_expression).
Context
The recurring deadline-reminder schedule is now provisioned entirely in infra-as-code (
DataTalksClub/infra-terraform), tracked in infra-terraform#1. The old CMP shell script + manual GitHub Actions workflow have already been removed from this repo — there is nothing for CMP to provision at runtime. This issue is just a recap so the CMP side knows what to keep working.What was provisioned in Terraform
A new file
cmp_deadline_reminder.tfadds:cron(0 9 * * ? *)).ecs:RunTaskoncourse-management-prod:*+iam:PassRoleon the execution role).Details:
387546586013, regioneu-west-1course-management-clustercourse-management-prod(the schedule references the family, so it always runs the latest active revision that CI/CD deploys — no pinning to a stale revision)course-management-prodWhat CMP needs to keep working
python manage.py send_deadline_remindersmust continue to exist and run to completion as a one-off task (it reconciles Datamailer recipient lists, triggers sends, and exits).DATAMAILER_URL = https://datamailer.dtcdev.click, same host for dev and prod).course-management-prod, the EventBridgecontainerOverrides[].nameincmp_deadline_reminder.tfmust be updated to match — otherwise the override is silently ignored.What does NOT need changing
course-management-ci-cd-deploy-user) needs no scheduling permissions — noscheduler:*,iam:CreateRole, oriam:PassRole.terraform applycreates everything.Notes
cmp_deadline_reminder.tf(schedule_expression).