wip subscription org

This commit is contained in:
2025-07-23 18:10:04 -03:00
parent 3060eb5ac0
commit 9c6fa7dcbb
15 changed files with 134 additions and 231 deletions

View File

@@ -42,10 +42,35 @@ Resources:
Properties:
RetentionInDays: 90
EventPatchEnrollFunction:
EventSetTermsIfSubscribedFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.stopgap.patch_enroll.lambda_handler
Handler: events.stopgap.set_terms_if_subscribed.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
- DynamoDBReadPolicy:
TableName: !Ref UserTable
Events:
DynamoDBEvent:
Type: EventBridgeRule
Properties:
Pattern:
resources: [!Ref EnrollmentTable]
detail-type: [INSERT]
detail:
new_image:
sk: ["0"]
# Post-migration: rename `tenant_id` to `org_id`
tenant_id:
- exists: true
EventPatchCourseMetadataFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.stopgap.patch_course_metadata.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies: