Show / Hide Table of Contents

LambdaSharp::S3::Unzip

The LambdaSharp::S3::Unzip type creates a resource that unzips a Package item and copies its contents to an S3 bucket.

On creation, the contents of the source zip package are copied to the destination S3 bucket. On update, the resource checks which files in the zip package have been added, updated, or removed and only copies or deletes the affected files. On delete, the resource attempts to remove all files that were previously copied to the S3 bucket.

NOTE: The maximum size of the zip package is limited by the amount of temporary storage available to a Lambda function. At the time of this writing, this limit is 512MB.

Using

Using:

  - Module: LambdaSharp.S3.IO:0.5@lambdasharp

Syntax

Type: LambdaSharp::S3::Unzip
Properties:
  SourceBucket: String
  SourceKey: String
  DestinationBucket: String
  DestinationKey: String

Properties

DestinationBucket

The DestinationBucket property specifies the destination S3 bucket name or ARN.

Required: Yes

Type: String

DestinationKey

The DestinationKey property specifies the destination prefix for all files copied from the zip package to destination S3 bucket.

Required: Yes

Type: String

Encoding

The Encoding property sets the content encoding to apply to all files copied from the zip package. The value must be one of: NONE, BROTLI, or GZIP. The encoded files are annotated with a Content-Encoding header matching the compression algorithm.

Note that BROTLI encoding is only valid for https:// connections.

Required: No

Type: String

SourceBucket

The SourceBucket property specifies the source S3 bucket name or ARN for the zip package.

Required: Yes

Type: String

SourceKey

The SourceKey property specifies the source key for the zip package.

Required: Yes

Type: String

Attributes

Url

The Url attribute contains the S3 URL of the destination bucket and key: s3://destination-bucket-name/destination-key-prefix.

Type: String

Examples

Create package of web assets and deploy them to an S3 bucket

- Resource: MyBucket
  Type: AWS::S3::Bucket

- Package: MyPackage
  Files: web-assets/

- Resource: DeployAssetsToBucket
  Type: LambdaSharp::S3::Unzip
  Properties:
    SourceBucket: !Ref Deployment::BucketName
    SourceKey: !Ref MyPackage
    DestinationBucket: !Ref MyBucket
    DestinationKey: assets/
In This Article
Back to top Generated by DocFX