Я получал приведенную ниже ошибку, когда пытался развернуть лямбду на AWS.
Serverless Error ---------------------------------------
An error occurred: WarmUpPluginLambdaFunction - The runtime parameter of nodejs6.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs10.x) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 5211b05e-0bd4-40d7-9555-9aac489053d0).
Итак, я обновил версию serverless-plugin-warmup.сейчас, когда я пытаюсь развернуть серверную лямбду на AWS, получаю сообщение об ошибке ниже.Плагин работал нормально с узлом 6.10
Serverless Error ---------------------------------------
Serverless plugin "serverless-plugin-warmup" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: linux
Node Version: 8.10.0
Serverless Version: 1.35.1
Нужна некоторая информация здесь, что происходит неправильно при развертывании на AWS.Сценарий для развертывания:
"deploy:staging": "cross-env NODE_ENV=staging sls deploy -s staging"
- Я обновил версию serverless-plugin-warmup с 3.0.0-rc.1 до 4.0.0-rc.1.
- Я обновил версию узла в AWS с 6.10 до 8.10
serverless.yml
plugins:
- serverless-plugin-warmup
- serverless-offline
- serverless-domain-manager
- serverless-log-forwarding
custom:
warmup:
schedule: 'cron(0/10 12-23 ? * MON-FRI *)'
prewarm: true
functions:
myFunction:
warmup: ${self:provider.environment.CRON}
handler: handler.myFunction
events:
- http:
path: '{model}/{id}'
method: GET
authorizer: auth
cors:
origins:
- ${self:provider.environment.APP_DOMAIN}
headers: ${self:custom.headers}
allowCredentials: true