add readme

This commit is contained in:
2025-05-25 09:54:54 -03:00
parent be177a9b40
commit d6c4eba78e
10 changed files with 156 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ Globals:
Architectures:
- x86_64
Layers:
- !Sub arn:aws:lambda:sa-east-1:336641857101:layer:layercake:65
- !Sub arn:aws:lambda:sa-east-1:336641857101:layer:layercake:67
Environment:
Variables:
TZ: America/Sao_Paulo
@@ -53,7 +53,7 @@ Resources:
Type: EventBridgeRule
Properties:
Pattern:
resources: [betaeducacao-prod-orders]
resources: [!Ref OrderTable]
detail-type: [INSERT]
detail:
new_image:
@@ -62,3 +62,54 @@ Resources:
- exists: true
metadata__tenant_id:
- exists: false
EventAssignTenantCpfFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.assign_tenant_cpf.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref UserTable
- DynamoDBCrudPolicy:
TableName: !Ref OrderTable
Events:
Event:
Type: EventBridgeRule
Properties:
Pattern:
resources: [!Ref OrderTable]
detail-type: [INSERT]
detail:
new_image:
sk: ["0"]
cpf:
- exists: true
metadata__tenant_id:
- exists: false
EventSetAsPaidFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.stopgap.set_as_paid.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
- DynamoDBWritePolicy:
TableName: !Ref OrderTable
Events:
Event:
Type: EventBridgeRule
Properties:
Pattern:
resources: [!Ref OrderTable]
detail-type: [INSERT]
detail:
new_image:
sk: ["0"]
cnpj:
- exists: true
total: [0]
status: [PENDING]
payment_method: [MANUAL]