forked from ajrussellaudio/wyoming-screengrabber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
35 lines (31 loc) · 971 Bytes
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
service: mondrian-bot
provider:
name: aws
runtime: nodejs10.x
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'us-west-2'}
profile: mondrianBotServerless
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
Resource: "arn:aws:s3:::${self:custom.env.IMAGE_BUCKET}/*"
custom:
env: ${file(./${self:provider.stage}.env.json)}
functions:
bot:
handler: src/handler.bot
events:
- schedule: cron(0 */6 * * ? *)
environment:
TWITTER_CONSUMER_KEY: ${self:custom.env.TWITTER_CONSUMER_KEY}
TWITTER_CONSUMER_SECRET: ${self:custom.env.TWITTER_CONSUMER_SECRET}
TWITTER_ACCESS_TOKEN: ${self:custom.env.TWITTER_ACCESS_TOKEN}
TWITTER_ACCESS_TOKEN_SECRET: ${self:custom.env.TWITTER_ACCESS_TOKEN_SECRET}
IMAGE_BUCKET: ${self:custom.env.IMAGE_BUCKET}
resources:
Resources:
S3BucketOutputs:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.env.IMAGE_BUCKET}