When I did SLS_DEBUG=* sls deploy
, I got below result.
Serverless: [AWS cloudformation 200 0.514s 0 retries] describeStacks({ StackName: 'myservice9999-ext-api-dev' })
Serverless: [AWS cloudformation 200 0.515s 0 retries] listStackResources({ StackName: 'myservice9999-ext-api-dev' })
Service Information
service: myservice9999-ext-api
stage: dev
region: ap-northeast-1
stack: myservice9999-ext-api-dev
resources: 27
api keys:
None
endpoints:
None
functions:
login: myservice9999-ext-api-dev-login
create_user: myservice9999-ext-api-dev-create_user
get_users: myservice9999-ext-api-dev-get_users
get_rooms: myservice9999-ext-api-dev-get_rooms
add_user_to_room: myservice9999-ext-api-dev-add_user_to_room
delete_user_from_room: myservice9999-ext-api-dev-delete_user_from_room
layers:
None
Serverless: [AWS cloudformation 400 0.496s 0 retries] describeStackResource({ LogicalResourceId: 'ApiGatewayRestApi',
StackName: 'myservice9999-ext-api-dev' })
Serverless Domain Manager: ValidationError: Resource ApiGatewayRestApi does not exist for stack myservice9999-ext-api-dev
~
Error --------------------------------------------------
~
Error: Failed to find CloudFormation resources for dev.myservice9999.com
~
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
~
Stack Trace --------------------------------------------
~
Error: Error: Failed to find CloudFormation resources for dev.myservice9999.com
at ServerlessCustomDomain.<anonymous> (/home/vagrant/work//myservice9999-ext-api/node_modules/serverless-domain-manager/dist/index.js:545:23)
at Generator.throw (<anonymous>)
at rejected (/home/vagrant/work/myservice9999-ext-api/node_modules/serverless-domain-manager/dist/index.js:5:65)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
From previous event:
at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:446:22)
at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:477:17)
at variables.populateService.then (/usr/lib/node_modules/serverless/lib/Serverless.js:110:33)
at processImmediate (internal/timers.js:443:21)
at process.topLevelDomainCallback (domain.js:136:23)
From previous event:
at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:97:6)
at serverless.init.then (/usr/lib/node_modules/serverless/bin/serverless:43:28)
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:111:16
at /usr/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqCallback.args [as oncomplete] (fs.js:145:20)
From previous event:
at initializeErrorReporter.then (/usr/lib/node_modules/serverless/bin/serverless:43:6)
at processImmediate (internal/timers.js:443:21)
at process.topLevelDomainCallback (domain.js:136:23)
And, my serverless.yml
is below. Is there something wrong in this setting?
service: myservice9999-ext-api
provider:
name: aws
runtime: ruby2.5
stage: dev
region: ap-northeast-1
profile: myservice9999
memorySize: 128
timeout: 20
custom:
customDomain:
domainName: "${self:provider.stage}.myservice9999.com"
stage: ${opt:stage, 'dev'}
certificateName: "myservice9999.com"
createRoute53Record: true
basePath: ''
endpointType: 'regional'
functions:
login:
handler: api.login
create_user:
handler: api.create_user
get_users:
handler: api.get_users
get_rooms:
handler: api.get_rooms
add_user_to_room:
handler: api.add_user_to_room
delete_user_from_room:
handler: api.delete_user_from_room
resources:
Resources:
RestApi :
Type : AWS::ApiGateway::RestApi
Properties :
Body : ${file(./swagger.yaml)}
LoginApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: LoginLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-login
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
CreateUserApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: CreateUnderscoreuserLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-create_user
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
GetUsersApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: GetUnderscoreusersLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-get_users
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
GetRoomsApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: GetUnderscoreroomsLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-get_rooms
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
AddUserToRoomApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: AddUnderscoreuserUnderscoretoUnderscoreroomLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-add_user_to_room
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
DeleteUserFromRoomApiToInvokeLambda:
Type: AWS::Lambda::Permission
DependsOn: DeleteUnderscoreuserUnderscorefromUnderscoreroomLambdaFunction
Properties:
FunctionName: myservice9999-ext-api-dev-delete_user_from_room
Action: lambda:InvokeFunction
Principal: apigateway.amazonaws.com
plugins:
- serverless-domain-manager