add courses
This commit is contained in:
47
courses-events/template.yaml
Normal file
47
courses-events/template.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
AWSTemplateFormatVersion: 2010-09-09
|
||||
Transform: AWS::Serverless-2016-10-31
|
||||
|
||||
Parameters:
|
||||
CourseTable:
|
||||
Type: String
|
||||
Default: saladeaula_courses
|
||||
|
||||
Globals:
|
||||
Function:
|
||||
CodeUri: app/
|
||||
Runtime: python3.13
|
||||
Tracing: Active
|
||||
Architectures:
|
||||
- x86_64
|
||||
Layers:
|
||||
- !Sub arn:aws:lambda:sa-east-1:336641857101:layer:layercake:79
|
||||
Environment:
|
||||
Variables:
|
||||
TZ: America/Sao_Paulo
|
||||
LOG_LEVEL: DEBUG
|
||||
POWERTOOLS_LOGGER_SAMPLE_RATE: 0.1
|
||||
POWERTOOLS_LOGGER_LOG_EVENT: true
|
||||
DYNAMODB_PARTITION_KEY: id
|
||||
COURSE_TABLE: !Ref CourseTable
|
||||
|
||||
Resources:
|
||||
EventLog:
|
||||
Type: AWS::Logs::LogGroup
|
||||
Properties:
|
||||
RetentionInDays: 90
|
||||
|
||||
EventDailySyncCourseMetadataFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: events.daily_sync_course_metadata.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref EventLog
|
||||
Policies:
|
||||
- DynamoDBWritePolicy:
|
||||
TableName: !Ref CourseTable
|
||||
Events:
|
||||
Rule:
|
||||
Type: ScheduleV2
|
||||
Properties:
|
||||
ScheduleExpression: cron(0 0 * * ? *)
|
||||
ScheduleExpressionTimezone: America/Sao_Paulo
|
||||
Reference in New Issue
Block a user