Show / Hide Table of Contents

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 Build attribute specifies a command to execute from the same directory as the module definition.

Required: No

Type: String

Description

The Description attribute specifies the package description.

Required: No

Type: String

Files

The Files attribute 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 Package attribute 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 Scope attribute specifies which functions need to have access to this item. The Scope attribute can be a comma-separated list or a YAML list of function names. If all functions need the item, then all can be used as a wildcard. In addition, public can be used to export the item from the module. Alternatively, stack can 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/
In This Article
Back to top Generated by DocFX