【发布时间】:2020-05-28 10:32:17
【问题描述】:
我使用无服务器 cli 在 AWS Lambda 上托管了一个 Nest.js 应用程序。
当我尝试访问端点时,我收到 {"message": "Endpoint request timed out"}。我尝试增加时间,但错误仍然存在。
我该如何解决这个问题?
serverless.yml
name: aws
runtime: nodejs12.x
stage: prod
profile: default # Config your AWS Profile
timeout: 120
environment: # Service wide environment variables
NODE_ENV: production
plugins:
- serverless-offline
- serverless-plugin-warmup
custom:
# Enable warmup on all functions (only for production and staging)
warmup:
enabled: true
package:
exclude:
- .git/**
- src/**
- test/**
- nodemon.json
- README.md
excludeDevDependencies: true
functions:
index:
handler: dist/serverless.handler
events:
- http:
cors: true
path: '/graphql'
method: any
【问题讨论】:
标签: amazon-web-services aws-lambda graphql timeout nestjs