UNPKG

2.13 kBYAMLView Raw
1# Welcome to Serverless!
2#
3# This file is the main config file for your service.
4# It's very minimal at this point and uses default values.
5# You can always add more config options for more control.
6# We've included some commented out config examples here.
7# Just uncomment any of them to get that config option.
8#
9# For full config options, check the docs:
10# docs.serverless.com
11#
12# Happy Coding!
13
14service: myservice
15# app and org for use with dashboard.serverless.com
16#app: your-app-name
17#org: your-org-name
18
19# You can pin your service to only deploy with a specific Serverless version
20# Check out our docs for more details
21frameworkVersion: '2'
22
23provider:
24 name: aws
25 runtime: nodejs12.x
26 lambdaHashingVersion: 20201221
27 stage: dev
28
29plugins:
30 - serverless-random-gateway-deployment-id
31
32functions:
33
34resources:
35 Outputs:
36 Resources:
37 ApiGatewayRestApi:
38 Type: AWS::ApiGateway::RestApi
39 Properties:
40 ApiKeySourceType: HEADER
41 Body: ${file(api.yml)}
42 Description: DCP - Public CheckIn Gateway (${opt:stage, self:provider.stage})
43 FailOnWarnings: false
44 Name: ${opt:stage, self:provider.stage}-gateway
45 EndpointConfiguration:
46 Types:
47 - REGIONAL
48 ApiGatewayDeployment:
49 Type: AWS::ApiGateway::Deployment
50 Properties:
51 Description: ${opt:stage, self:provider.stage}
52 RestApiId: !Ref ApiGatewayRestApi
53 ApiGatewayStage:
54 Type: AWS::ApiGateway::Stage
55 Properties:
56 StageName: ${opt:stage, self:provider.stage}
57 Description: ${opt:stage, self:provider.stage} Stage
58 RestApiId: !Ref ApiGatewayRestApi
59 DeploymentId: !Ref ApiGatewayDeployment
60 MethodSettings:
61 - DataTraceEnabled: true
62 HttpMethod: "*"
63 LoggingLevel: ERROR
64 ResourcePath: "/*"
65 MetricsEnabled: true
66 ApiGatewayBasePath:
67 Type: AWS::ApiGateway::BasePathMapping
68 DependsOn: ApiGatewayStage
69 Properties:
70 BasePath: some-path
71 DomainName: www.test.de
72 RestApiId: !Ref ApiGatewayRestApi
73 Stage: !Ref ApiGatewayStage