fix
This commit is contained in:
@@ -11,6 +11,9 @@ Parameters:
|
||||
OrderTable:
|
||||
Type: String
|
||||
Default: betaeducacao-prod-orders
|
||||
CourseTable:
|
||||
Type: String
|
||||
Default: saladeaula_courses
|
||||
|
||||
Globals:
|
||||
Function:
|
||||
@@ -31,6 +34,7 @@ Globals:
|
||||
USER_TABLE: !Ref UserTable
|
||||
ORDER_TABLE: !Ref OrderTable
|
||||
ENROLLMENT_TABLE: !Ref EnrollmentTable
|
||||
COURSE_TABLE: !Ref CourseTable
|
||||
|
||||
Resources:
|
||||
EventLog:
|
||||
@@ -64,10 +68,10 @@ Resources:
|
||||
metadata__tenant_id:
|
||||
- exists: false
|
||||
|
||||
EventRemoveSlotsOnCanceledFunction:
|
||||
EventRemoveSlotsIfCanceledFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.delete_slots_on_canceled.lambda_handler
|
||||
Handler: events.delete_slots_if_canceled.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
@@ -89,6 +93,28 @@ Resources:
|
||||
- exists: true
|
||||
status: [CANCELED, EXPIRED]
|
||||
|
||||
EventPatchItemsFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.stopgap.patch_items.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- DynamoDBWritePolicy:
|
||||
TableName: !Ref OrderTable
|
||||
- DynamoDBReadPolicy:
|
||||
TableName: !Ref CourseTable
|
||||
Events:
|
||||
Event:
|
||||
Type: EventBridgeRule
|
||||
Properties:
|
||||
Pattern:
|
||||
resources: [!Ref OrderTable]
|
||||
detail-type: [INSERT]
|
||||
detail:
|
||||
new_image:
|
||||
sk: ["items"]
|
||||
|
||||
EventSetAsPaidFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
|
||||
Reference in New Issue
Block a user