update event
This commit is contained in:
@@ -219,11 +219,10 @@ Resources:
|
||||
- !Sub arn:aws:ses:${AWS::Region}:${AWS::AccountId}:identity/eduseg.com.br
|
||||
- !Sub arn:aws:ses:${AWS::Region}:${AWS::AccountId}:configuration-set/tracking
|
||||
|
||||
# If the user does not access the course within 3 days after enrollment creation
|
||||
EventReminderNoAccessAfter3DaysFunction:
|
||||
EventSendReminderEmailsFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.emails.reminder_no_access_after_3_days.lambda_handler
|
||||
Handler: events.emails.send_reminder_emails.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
@@ -239,17 +238,19 @@ Resources:
|
||||
detail-type: [EXPIRE]
|
||||
detail:
|
||||
keys:
|
||||
sk: [SCHEDULE#REMINDER_NO_ACCESS_AFTER_3_DAYS]
|
||||
sk:
|
||||
- SCHEDULE#REMINDER_NO_ACCESS_AFTER_3_DAYS
|
||||
- SCHEDULE#REMINDER_NO_ACTIVITY_AFTER_7_DAYS
|
||||
- SCHEDULE#REMINDER_ACCESS_PERIOD_BEFORE_30_DAYS
|
||||
- SCHEDULE#REMINDER_CERT_EXPIRATION_BEFORE_30_DAYS
|
||||
|
||||
# 7 days after the user's last activity in the course
|
||||
EventReminderNoActivityAfter7DaysFunction:
|
||||
EventScheduleRemindersFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.emails.reminder_no_activity_after_7_days.lambda_handler
|
||||
Handler: events.schedule_reminders.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- !Ref SesPolicy
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref EnrollmentTable
|
||||
Events:
|
||||
@@ -258,54 +259,11 @@ Resources:
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref EnrollmentTable]
|
||||
detail-type: [EXPIRE]
|
||||
detail-type: [INSERT]
|
||||
detail:
|
||||
keys:
|
||||
sk: [SCHEDULE#REMINDER_NO_ACTIVITY_AFTER_7_DAYS]
|
||||
|
||||
# 30 days before the course access period ends.
|
||||
EventReminderAccessPeriodBefore30DaysFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.emails.reminder_access_period_before_30_days.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- !Ref SesPolicy
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref EnrollmentTable
|
||||
Events:
|
||||
DynamoDBEvent:
|
||||
Type: EventBridgeRule
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref EnrollmentTable]
|
||||
detail-type: [EXPIRE]
|
||||
detail:
|
||||
keys:
|
||||
sk: [SCHEDULE#REMINDER_ACCESS_PERIOD_BEFORE_30_DAYS]
|
||||
|
||||
# If a certificate exists, remind the user 30 days before the certificate expires
|
||||
EventReminderCertExpirationBefore30DaysFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.emails.reminder_cert_expiration_before_30_days.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- !Ref SesPolicy
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref EnrollmentTable
|
||||
Events:
|
||||
DynamoDBEvent:
|
||||
Type: EventBridgeRule
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref EnrollmentTable]
|
||||
detail-type: [EXPIRE]
|
||||
detail:
|
||||
keys:
|
||||
sk: [SCHEDULE#REMINDER_CERT_EXPIRATION_BEFORE_30_DAYS]
|
||||
new_image:
|
||||
sk: ["0"]
|
||||
status: [PENDING]
|
||||
|
||||
EventSetAccessExpiredFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
@@ -347,27 +305,6 @@ Resources:
|
||||
keys:
|
||||
sk: [SCHEDULE#SET_CERT_EXPIRED, SCHEDULE#SET_AS_ARCHIVED]
|
||||
|
||||
EventScheduleRemindersFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.schedule_reminders.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- DynamoDBCrudPolicy:
|
||||
TableName: !Ref EnrollmentTable
|
||||
Events:
|
||||
DynamoDBEvent:
|
||||
Type: EventBridgeRule
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref EnrollmentTable]
|
||||
detail-type: [INSERT]
|
||||
detail:
|
||||
new_image:
|
||||
sk: ["0"]
|
||||
status: [PENDING]
|
||||
|
||||
EventIssueCertFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
|
||||
Reference in New Issue
Block a user