サーバーレス: サービスファイルは変更されていません。デプロイメントをスキップします。質問する

サーバーレス: サービスファイルは変更されていません。デプロイメントをスキップします。質問する

いくつかのプロジェクトが成功した後、AWS-lambda 内の関数を削除し、CloudWatch のログと IAM ロールを削除しました。また、my-serviceドキュメントからフォルダーも削除しました。

それから私はこの手順に従いましたチュートリアルサーバーレスで。

今実行すると:

serverless deploy --aws-profile testUser_atWork

ここで、testUser_atWork は AWS で接続するプロファイルの 1 つです。

次のエラーが発生します:

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

そしてこれが私の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 });
};

なぜデプロイメントをスキップするのか理解できません。

ベストアンサー1

serverless deploy --aws-profile testUser_atWork --forceスタックを強制的に更新するために、次の操作を試しましたか?

それ以外の場合は、CloudFormationでスタックを削除するか、serverless removeコマンドで削除してみてください。

おすすめ記事