app: ${file(./package.json):name} service: uploads package: individually: true provider: name: aws stage: ${opt:stage,'dev'} runtime: nodejs12.x environment: S3_BUCKET: ${self:app}-uploads-production iamRoleStatements: - 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 functions: fileHandler: handler: handler.filesHandler timeout: 30 # optional, in seconds, default is 6timeout: 10 # optional, in seconds, default is 6 events: - http: path: / method: post cors: true - http: path: / method: get cors: true