0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Golang + Lambdaでサーバレス開発時にWarning「Support for "package.include" and "package.exclude" will be removed with next major release.」が出た時の対応

Posted at

背景

Golang + Lambdaでサーバレス開発中にsls invoke -f 関数名を実行すると、以下のWarningが発生しました。

Serverless: Deprecation warnings:

Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS

対処法

serverless.ymlを以下のように書き直せばOKです。

serverless.yml
package:
 exclude:
   - ./**
 include:
   - ./bin/**

serverless.yml
package:
  patterns:
    - "!./**"
    - "./bin/**"

!をつけると、excludeされるようです。
詳しくはログに記載の以下URLを見ればOKです。
https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?