This commit is contained in:
2026-01-21 21:31:32 -03:00
parent 26c3df876f
commit 37a9b20188
38 changed files with 1009 additions and 532 deletions

View File

@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: 2010-09-09
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Parameters:
@@ -21,11 +21,11 @@ Parameters:
Globals:
Function:
CodeUri: app/
Runtime: python3.13
Runtime: python3.14
Architectures:
- x86_64
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:layercake:104
- !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:layercake:106
Environment:
Variables:
TZ: America/Sao_Paulo
@@ -179,8 +179,10 @@ Resources:
detail:
new_image:
# Post-migration: uncomment the following lines
# sk: [SLOT]
# mode: [STANDALONE]
# sk: [FULFILLMENT]
# status: [IN_PROGRESS]
# user_id:
# - exists: true
sk: [generated_items]
scope: [SINGLE_USER]
status: [PENDING]
@@ -194,7 +196,7 @@ Resources:
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
- DynamoDBReadPolicy:
- DynamoDBCrudPolicy:
TableName: !Ref UserTable
Events:
DynamoDBEvent:
@@ -217,6 +219,8 @@ Resources:
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
- DynamoDBCrudPolicy:
TableName: !Ref UserTable
Events:
DynamoDBEvent:
Type: EventBridgeRule
@@ -234,6 +238,7 @@ Resources:
old_image:
status: [IN_PROGRESS]
# DEPRECATED
EventAllocateSlotsFunction:
Type: AWS::Serverless::Function
Properties:
@@ -256,38 +261,10 @@ Resources:
detail-type: [INSERT]
detail:
new_image:
# Post-migration: uncomment the following lines
# sk: [SLOT]
# mode: [BATCH]
sk: [generated_items]
scope: [MULTI_USER]
status: [PENDING]
EventAllocateSeatsFunction:
Type: AWS::Serverless::Function
Properties:
Handler: events.allocate_seats.lambda_handler
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
- DynamoDBCrudPolicy:
TableName: !Ref OrderTable
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
- DynamoDBReadPolicy:
TableName: !Ref CourseTable
Events:
DynamoDBEvent:
Type: EventBridgeRule
Properties:
Pattern:
resources: [!Ref OrderTable]
detail-type: [INSERT]
detail:
new_image:
sk: [SEATS_ALLOCATION]
status: [PENDING]
SesPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
@@ -395,8 +372,7 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: events.issue_cert.lambda_handler
Tracing: Active
Timeout: 10
Timeout: 12
LoggingConfig:
LogGroup: !Ref EventLog
Policies:
@@ -417,6 +393,9 @@ Resources:
sk: ['0']
new_image:
status: [COMPLETED]
cert:
issued_at:
- exists: false
old_image:
status: [IN_PROGRESS]
@@ -424,11 +403,12 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: events.ask_to_sign.lambda_handler
Tracing: Active
Timeout: 12
Policies:
- S3ReadPolicy:
BucketName: !Ref BucketName
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
LoggingConfig:
LogGroup: !Ref EventLog
Events: