#10099·serverless

请求验证器名称必须唯一

作者: zoellner创建于 2021年10月14日更新于 2026年8月20日
标签needs feedbackcat/aws-event-api-gateway

service: bcb-server-api frameworkVersion: "=2.62.0" projectDir: ../../ plugins:

  • serverless-iam-roles-per-function
  • serverless-domain-manager
  • serverless-prune-plugin
  • serverless-associate-waf
  • serverless-offline provider: name: AWS runtime: nodejs14.x region: us-east-1 stage: ${self:custom.stage} deploymentBucket: name: ${self:custom.config.deploymentBucket} serverSideEncryption: AES256 environment: ${file(./environment.yaml)} apiGateway: apiKeySourceType: AUTHORIZER minimumCompressionSize: 1024 endpointType: REGIONAL logRetentionInDays: 90 tracing: apiGateway: true lambda: true tags: WAFCustomHeader: true vpc: securityGroupIds:
  • ${self:custom.config.noIngressSecurityGroup} subnetIds: ${self:custom.config.privateSubnetIds} iam: role: statements:
  • Effect: Allow Action:
    • xray:PutTraceSegments
    • xray:PutTelemetryRecords Resource: "*" custom: stage: ${opt:stage, 'local'} serverless-offline: httpPort: 8100 lambdaPort: 18100 noPrependStageInUrl: true prune: automatic: true number: 5 serverless-iam-roles-per-function: defaultInherit: true associateWaf: version: V2 name: ${self:custom.config.WAFname}

stage dependent variables

config: ${file(./env-${self:custom.stage}.yml)}

customDomain: enabled: ${self:custom.config.domainManagerEnabled} domainName: api.${self:custom.config.baseDomain} basePath: api createRoute53Record: true endpointType: regional

内容来源: serverless/serverless