You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,11 +83,14 @@ When `serverless deploy` is run, the plugin will:
83
83
The Serverless framework will then pickup each zip file and upload it to your provider.
84
84
85
85
Here's a simple `serverless.yml` configuration for this plugin, assuming the project structure above
86
-
one of the fuctions we add `-${opt:stage}` to the name in order to append the stage to the function name
86
+
one of the functions we add `-${opt:stage}` to the name in order to append the stage to the function name
87
87
88
88
```
89
89
service: your-awesome-project
90
90
91
+
package:
92
+
individually: true
93
+
91
94
plugins:
92
95
- serverless-package-python-functions
93
96
@@ -136,6 +139,9 @@ At the function level, you:
136
139
- 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
137
140
- 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.
138
141
142
+
At the package level, you may need to:
143
+
- 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.
144
+
139
145
Now, you may be wondering, doesn't the [Serverless documentation say](https://serverless.com/framework/docs/providers/aws/guide/packaging#artifact):
140
146
> 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.
0 commit comments