update layercake

This commit is contained in:
2025-10-06 23:16:42 -03:00
parent 942c038744
commit 161b75db8d
13 changed files with 95 additions and 24 deletions

View File

@@ -8,6 +8,9 @@ Parameters:
EnrollmentTable:
Type: String
Default: betaeducacao-prod-enrollments
BucketName:
Type: String
Default: saladeaula.digital
Globals:
Function:
@@ -17,7 +20,7 @@ Globals:
Architectures:
- x86_64
Layers:
- !Sub arn:aws:lambda:sa-east-1:336641857101:layer:layercake:96
- !Sub arn:aws:lambda:sa-east-1:336641857101:layer:layercake:97
Environment:
Variables:
TZ: America/Sao_Paulo
@@ -27,6 +30,7 @@ Globals:
DYNAMODB_PARTITION_KEY: id
COURSE_TABLE: !Ref CourseTable
ENROLLMENT_TABLE: !Ref EnrollmentTable
BUCKET_NAME: !Ref BucketName
Resources:
HttpLog:
@@ -42,7 +46,7 @@ Resources:
AllowMethods: [GET, POST, PUT, DELETE, PATCH, OPTIONS]
AllowHeaders: [Content-Type, X-Requested-With, Authorization]
AllowCredentials: false
MaxAge: 600
MaxAge: 600 # 10 minutes
Auth:
DefaultAuthorizer: OAuth2Authorizer
Authorizers:
@@ -66,6 +70,8 @@ Resources:
TableName: !Ref CourseTable
- DynamoDBCrudPolicy:
TableName: !Ref EnrollmentTable
- S3WritePolicy:
BucketName: !Ref BucketName
Events:
Preflight:
Type: HttpApi