无服务器:服务文件未更改。跳过部署

zwi*_*ion 8 deployment serverless-framework

在完成一些成功的项目之后,我删除了AWS-lambda内部的功能,删除了CloudWatch和IAM角色中的日志。还my-service从我的文档中删除了该文件夹。

然后,我在无服务器环境中遵循了本教程中的步骤。

现在,当我运行时:

serverless deploy --aws-profile testUser_atWork
Run Code Online (Sandbox Code Playgroud)

其中testUser_atWork是我要在AWS中连接的配置文件之一。

我收到以下错误:

Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Service files not changed. Skipping deployment...
Service Information
service: my-service
stage: dev
region: us-east-1
stack: my-service-dev
api keys:
  None
endpoints:
  None
functions:
  hello: my-service-dev-hello




//serverless.yml

service: my-service

provider:
  name: aws
  runtime: nodejs6.10


functions:
  hello:
    handler: handler.hello
Run Code Online (Sandbox Code Playgroud)

这是我的handler.js

'use strict';

module.exports.hello = (event, context, callback) => {
  const response = {
    statusCode: 200,
    body: JSON.stringify({
      message: 'Go Serverless v1.0! Your function executed successfully!',
      input: event,
    }),
  };

  callback(null, response);

  // Use this code if you don't use the http event with the LAMBDA-PROXY integration
  // callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event });
};
Run Code Online (Sandbox Code Playgroud)

我不明白为什么它会跳过部署。

ion*_*nut 17

您是否尝试过: serverless deploy --aws-profile testUser_atWork --force 强制其更新堆栈?

否则,请尝试以cloudformation或以下serverless remove命令删除堆栈