app: ${file(./package.json):name} service: admin package: individually: true provider: name: aws stage: ${opt:stage,'dev'} runtime: nodejs12.x environment: AWS_Hooks: hooks-${self:provider.stage}-hookHandler S3_BUCKET: ${self:app}-appdata iamRoleStatements: - Effect: Allow Action: - lambda:InvokeFunction Resource: '*' - Effect: Allow Action: - s3:* Resource: arn:aws:s3:::${self:provider.environment.S3_BUCKET}/* plugins: - serverless-webpack - serverless-domain-manager custom: stage: ${opt:stage, self:provider.stage} domains: ${file(./config/domains.yaml):domains} customDomain: ${file(./config/domains.yaml):customDomain} webpack: webpackConfig: './lib/seed/webpack.config.js' # Name of webpack configuration file includeModules: forceExclude: - aws-sdk - puppeteer functions: admin: handler: handler.adminHandler timeout: 60 events: - http: path: / method: post cors: origin: '*' headers: - Content-Type - Authorization - X-Api-Key - X-Amz-Security-Token - X-Amz-User-Agent - organisationid - http: path: / method: get cors: true