diff --git a/README.md b/README.md index fbaede2..08b3a43 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,14 @@ When `serverless deploy` is run, the plugin will: The Serverless framework will then pickup each zip file and upload it to your provider. Here's a simple `serverless.yml` configuration for this plugin, assuming the project structure above -one of the fuctions we add `-${opt:stage}` to the name in order to append the stage to the function name +one of the functions we add `-${opt:stage}` to the name in order to append the stage to the function name ``` service: your-awesome-project +package: + individually: true + plugins: - serverless-package-python-functions @@ -136,6 +139,9 @@ At the function level, you: - Use `include` to specify what function-level files you want to include in your artifact. Simply specifying the path to the function's folder will include every file in the folder in the function's zip artifact - Use `artifact` to tell Serverless where to find the zip artifact. The plugin creates the zip artifact for the function at `buildDir`/`name`.zip, so using `${self:custom.pkgPyFuncs.buildDir}/[function-name-here].zip` is advised. +At the package level, you may need to: +- Specify the `individually` parameter as `true` to ensure that zip artifacts are generated properly. You may need this if you are getting file not found errors about your zip artifact. + Now, you may be wondering, doesn't the [Serverless documentation say](https://serverless.com/framework/docs/providers/aws/guide/packaging#artifact): > Serverless won't zip your service if [artifact] is configured and therefore exclude and include will be ignored. Either you use artifact or include / exclude.