Hi
When i update to 1.80 i get the following error when i deploy
Serverless Error ---------------------------------------
An error occurred: ApiGatewayStage - Property RestApiId cannot be empty..
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: linux
Node Version: 8.11.3
Serverless Version: 1.28.0
When i revert back to version 1.7.10. It works fine.
Here is my serverless.yml file.
`service: alerts
provider:
name: aws
stage: dev
runtime: nodejs8.10
region: ap-southeast-2
iamRoleStatements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
- "ec2:CreateNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
- "ec2:DeleteNetworkInterface"
Resource: "*"
custom:
stageVariables:
env: ${opt:stage, self:provider.stage}
dev:
securityGroupIds:
- sg-70a03a17
subnetIds:
- subnet-a32f56c7
gisHost: xxxxxx
cmsHost: xxxxxx
enableCache: false
requireValidCert: '0'
uat:
securityGroupIds:
- sg-e1a73186
subnetIds:
- subnet-2921584d
gisHost: xxxxxxxx
cmsHost: xxxxxxxx
enableCache: false
requireValidCert: '1'
v1:
securityGroupIds:
- sg-74b02613
subnetIds:
- subnet-76295012
gisHost: xxxxxx
cmsHost: xxxxxx
enableCache: false
requireValidCert: '1'
package:
exclude:
- "/.npmignore"
- "/node_modules/aws-sdk"
- "/node_modules/serverless-mocha-plugin"
- "/test"
- "/.gitignore"
- "/readme.md"
functions:
getAllAlerts:
handler: getAlerts.getAllAlerts
memorySize: 512
timeout: 45
vpc:
securityGroupIds: ${self:custom.${self:custom.stageVariables.env}.securityGroupIds}
subnetIds: ${self:custom.${self:custom.stageVariables.env}.subnetIds}
environment:
GIS_HOST: ${self:custom.${self:custom.stageVariables.env}.gisHost}
CMS_HOST: ${self:custom.${self:custom.stageVariables.env}.cmsHost}
REQUIRE_CERT: ${self:custom.${self:custom.stageVariables.env}.requireValidCert}
events:
- http:
path: alerts
method: get
private: true
cors: true
getDetail:
handler: getDetail.getDetail
memorySize: 128
timeout: 30
vpc:
securityGroupIds: ${self:custom.${self:custom.stageVariables.env}.securityGroupIds}
subnetIds: ${self:custom.${self:custom.stageVariables.env}.subnetIds}
environment:
GIS_HOST: ${self:custom.${self:custom.stageVariables.env}.gisHost}
CMS_HOST: ${self:custom.${self:custom.stageVariables.env}.cmsHost}
REQUIRE_CERT: ${self:custom.${self:custom.stageVariables.env}.requireValidCert}
events:
- http:
path: alerts/{id}
method: get
private: true
cors: true
getAlertByRegion:
handler: getAlerts.getAlertByRegion
memorySize: 512
timeout: 30
vpc:
securityGroupIds: ${self:custom.${self:custom.stageVariables.env}.securityGroupIds}
subnetIds: ${self:custom.${self:custom.stageVariables.env}.subnetIds}
environment:
GIS_HOST: ${self:custom.${self:custom.stageVariables.env}.gisHost}
CMS_HOST: ${self:custom.${self:custom.stageVariables.env}.cmsHost}
REQUIRE_CERT: ${self:custom.${self:custom.stageVariables.env}.requireValidCert}
events:
- http:
path: alerts/region/{regionId}
method: get
private: true
cors: true
getBookingAlerts:
handler: getBookingAlerts.getBookingAlerts
memorySize: 512
timeout: 30
vpc:
securityGroupIds: ${self:custom.${self:custom.stageVariables.env}.securityGroupIds}
subnetIds: ${self:custom.${self:custom.stageVariables.env}.subnetIds}
environment:
GIS_HOST: ${self:custom.${self:custom.stageVariables.env}.gisHost}
CMS_HOST: ${self:custom.${self:custom.stageVariables.env}.cmsHost}
REQUIRE_CERT: ${self:custom.${self:custom.stageVariables.env}.requireValidCert}
events:
- http:
path: alerts/bookingservices/{id}
method: get
private: true
cors: true
resources:
Resources:
ApiGatewayStage:
Type: AWS::ApiGateway::Stage
Properties:
MethodSettings:
- DataTraceEnabled: true
HttpMethod: ""
LoggingLevel: INFO
ResourcePath: "/"
MetricsEnabled: true
plugins:
- serverless-mocha-plugin
- serverless-plugin-stage-variables
`
Could you please provide some guidance.
Thanks