-
Notifications
You must be signed in to change notification settings - Fork 5
/
serverless.base.js
40 lines (38 loc) · 1.18 KB
/
serverless.base.js
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
36
37
38
39
40
'use strict';
const path = require('path');
module.exports = {
provider: {
name: 'aws',
runtime: 'nodejs6.10',
stage: '${opt:stage, "dev"}',
region: '${opt:region, "us-east-1"}',
memorySize: 128,
timeout: 10,
deploymentBucket: {
name:
'com.github-stats.${self:provider.region}.${self:provider.stage}.deploys'
},
environment: {
BUCKET:
'com.github-stats.${self:provider.region}.${self:provider.stage}.images',
GITHUB_TOKEN: '${env:GITHUB_TOKEN}',
SLACK_TOKEN: '${env:SLACK_TOKEN}',
STAGE: '${self:provider.stage}'
},
iamRoleStatements: [
{
Effect: 'Allow',
Action: ['s3:ListBucket'],
Resource: ['arn:aws:s3:::com.github-stats.us-east-1.dev.images']
},
{
Effect: 'Allow',
Action: ['s3:PutObject', 's3:GetObject'],
Resource: [
'arn:aws:s3:::com.github-stats.us-east-1.dev.images/*'
]
}
]
},
plugins: ['serverless-webpack']
};