Package
The package definition creates a compressed zip package from a local path. The zip package is then uploaded to the deployment S3 bucket during the LambdaSharp CLI publish step. All items in the zip package are given read-write permissions, unless the item has a Linux executable with an ELF header, in which case the item is given read-and-execute permission (see GifMaker Sample).
Syntax
Package: String
Description: String
Scope: ScopeDefinition
Build: String
Files: String
Properties
Build-
The
Buildattribute specifies a command to execute from the same directory as the module definition.Required: No
Type: String
Description-
The
Descriptionattribute specifies the package description.Required: No
Type: String
Files-
The
Filesattribute specifies a path to a local folder. The path can optionally have a wildcard suffix (e.g.*.json). If the wildcard suffix is omitted, all files and sub-folders are included, recursively. Otherwise, only the top folder and files matching the wildcard are included.Required: Yes
Type: String
Package-
The
Packageattribute specifies the item name. The name must start with a letter and followed only by letters or digits. Punctuation marks are not allowed. All names are case-sensitive.Required: Yes
Type: String
Scope-
The
Scopeattribute specifies which functions need to have access to this item. TheScopeattribute can be a comma-separated list or a YAML list of function names. If all functions need the item, thenallcan be used as a wildcard. In addition,publiccan be used to export the item from the module. Alternatively,stackcan be used to make the item available only in a nested stack.Required: No
Type: Comma-delimited String or List of String
Return Values
Ref
When the logical ID of this item is provided to the Ref intrinsic function, Ref returns the S3 key of the published zip package.
Examples
Create package of local files
- Package: MyPackage
Files: WebAssets/
Create package from a published Blazor WebAssembly project
- Package: MyBlazorPackage
Build: dotnet publish -c Release MyBlazorApp
Files: MyBlazorApp/bin/Release/netstandard2.1/publish/wwwroot/