AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: Chouseisan-reminder Parameters: ChouseisanNotifySlackUrl: Type : AWS::SSM::Parameter::Value Resources: ChouseisanReminderFunction: Type: AWS::Serverless::Function Properties: FunctionName: chouseisan-reminder-function CodeUri: hello_world/ Handler: app.lambda_handler Runtime: python3.7 Timeout: 10 Environment: Variables: TZ: Asia/Tokyo INCOMMING_WEBHOOK_URL: !Ref ChouseisanNotifySlackUrl Events: NotifySlack: Type: Schedule Properties: Schedule: cron(0 0 1-7 * ? *) # 日本時間で毎月1-7日のAM9時 ChouseisanReminderFunctionLogGroup: Type: AWS::Logs::LogGroup Properties: LogGroupName: !Sub "/aws/lambda/${ChouseisanReminderFunction}"