Skip to content

Instantly share code, notes, and snippets.

@kachina
Created December 16, 2020 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kachina/fe1ffdfd83348d3075c7d89f139c6db1 to your computer and use it in GitHub Desktop.
Save kachina/fe1ffdfd83348d3075c7d89f139c6db1 to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 900
Environment:
Variables:
TZ: Asia/Tokyo
Parameters:
ApiKey:
Type: String
Description: OpenWeatherMap API Key
Default: DUMMY_API_KEY
Place:
Type: String
Description: OpenWeatherMap Place
Default: Tokyo,Jp
Resources:
WeeklyTask:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: handler.lambda_handler
Runtime: python3.8
Events:
ScheduledEvent:
Type: Schedule
Properties:
Schedule: cron(0 1 ? * FRI *)
Enabled: True
Environment:
Variables:
OWM_API_KEY: !Ref ApiKey
OWM_PLACE: !Ref Place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment