Created
January 21, 2018 03:59
-
-
Save pavelvlasov/dd75de90a0efea94e987fe4633daac94 to your computer and use it in GitHub Desktop.
stats service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const baseConfig = require('../../serverless.base'); | |
const { defaultsDeep } = require('lodash'); | |
module.exports = defaultsDeep( | |
{ | |
service: 'git-stats', | |
provider: { | |
iamRoleStatements: [ | |
...baseConfig.provider.iamRoleStatements, | |
{ | |
Effect: 'Allow', | |
Action: ['lambda:InvokeFunction'], | |
Resource: ['*'] | |
} | |
] | |
}, | |
functions: { | |
getContributorStatsImage: { | |
name: '${self:provider.stage}-getContributorStatsImage', | |
handler: 'index.handler', | |
events: [ | |
{ | |
http: { | |
path: '/stats/contributors/{owner}/{repo}', | |
method: 'get', | |
parameters: { | |
paths: { | |
owner: true, | |
repo: true | |
}, | |
querystrings: { | |
start: false, | |
end: false | |
} | |
} | |
} | |
} | |
], | |
memorySize: 256, | |
timeout: 30 | |
} | |
}, | |
custom: { | |
webpack: './webpack.config.ts' | |
} | |
}, | |
baseConfig | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getBaseConfig from "../../webpack.dev"; | |
module.exports = getBaseConfig(__dirname); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment