1.1.0 • Published 6 years ago

serverless-content-encoding v1.1.0

Weekly downloads
3,408
License
MIT
Repository
github
Last release
6 years ago

Serverless Content Encoding

A serverless plugin to enable Content Encoding feature in API Gateway for lambda function response compression.

Install

Using yarn:

$ yarn add -D serverless-content-encoding

Using npm:

$ npm install --save-dev serverless-content-encoding

Configuration

Add the plugin and its configuration to your serverless.yml file:

plugins:
  - serverless-content-encoding

custom:
  contentEncoding:
    minimumCompressionSize: 0 # Minimum body size required for compression in bytes
  • minimumCompressionSize must be an Integer which greater than or equal 0.
  • If contentEncoding is not configured, minimumCompressionSize will be set to default value which is 0 bytes.
  • If you want to disable Content Encoding, set minimumCompressionSize to null.

Usage

This plugin will be triggered during deployment process

$ serverless deploy

Note

This plugin is to enable Content Encoding on API Gateway for response compression. If your are looking for binary files support, please use serverless-apigw-binary

Thanks @evgenykireev for the recommendation of using MinimumCompressionSize in CloudFormation instead of CreateDeployment API

1.1.0

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago