Skip to content

Instantly share code, notes, and snippets.

@pavelvlasov
Created January 21, 2018 03:59
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 pavelvlasov/dd75de90a0efea94e987fe4633daac94 to your computer and use it in GitHub Desktop.
Save pavelvlasov/dd75de90a0efea94e987fe4633daac94 to your computer and use it in GitHub Desktop.
stats service
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
);
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