add cancel

This commit is contained in:
2025-07-18 00:14:45 -03:00
parent 6acc4bde4d
commit 61e7ac0f4b
7 changed files with 107 additions and 44 deletions

View File

@@ -81,3 +81,26 @@ Resources:
sk: ["konviva"]
enrollment_id:
- exists: false
EventCancelFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.cancel.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
- DynamoDBReadPolicy:
TableName: !Ref EnrollmentTable
Events:
DynamoDBEvent:
Type: EventBridgeRule
Properties:
Pattern:
resources: [!Ref EnrollmentTable]
detail-type: [MODIFY]
detail:
new_image:
sk: ["0"]
status: [CANCELED]
old_image:
status: [PENDING]