serverless-plugin-warmup 7.3.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@ Keep your lambdas warm during winter.
10
10
 
11
11
  **Requirements:**
12
12
  * Node *v14.x* or higher
13
- * Serverless *v3.x* or higher
13
+ * Serverless *v3.8* or higher
14
14
  * AWS provider
15
15
 
16
16
  ## How it works
@@ -45,7 +45,7 @@ custom:
45
45
  - schedule: cron(0/5 8-17 ? * MON-FRI *)
46
46
  concurrency: 10
47
47
  verbose: true
48
- logRetentionInDays: 10
48
+ logRetentionInDays: 14
49
49
  outOfOfficeHoursWarmer:
50
50
  enabled: true
51
51
  events:
@@ -68,13 +68,13 @@ The options are the same for all the warmers:
68
68
  * **vpc** The VPC and subnets in which to deploy. Can be any [Serverless VPC configuration](https://serverless.com/framework/docs/providers/aws/guide/functions#vpc-configuration) or be set to `false` in order to deploy the warmup function outside of a VPC (defaults to the vpc in the provider)
69
69
  * **memorySize** The memory to be assigned to the warmer lambda (defaults to `128`)
70
70
  * **events** The event that triggers the warmer lambda. Can be any [Serverless event](https://serverless.com/framework/docs/providers/aws/events/) (defaults to `- schedule: rate(5 minutes)`)
71
- * **architecture** The [instruction set to use for the lambda](https://www.serverless.com/framework/docs/providers/aws/guide/functions#instruction-set-architecture) (defaults to `arm64`)
71
+ * **architecture** The [instruction set to use for the lambda](https://www.serverless.com/framework/docs/providers/aws/guide/functions#instruction-set-architecture) (defaults to `x86_64`)
72
72
  * **package** The package configuration. Can be any [Serverless package configuration](https://serverless.com/framework/docs/providers/aws/guide/packaging#package-configuration) (defaults to `{ individually: true, patterns: ['!**', '.warmup/${warmerName}/**'] }`)
73
73
  * **timeout** How many seconds until the warmer lambda times out. (defaults to `10`)
74
74
  * **environment** Can be used to set environment variables in the warmer lambda. You can also unset variables configured at the provider by setting them to undefined. However, you should almost never have to change the default. (defaults to unset all package level environment variables. )
75
75
  * **tracing** Specify whether to enable/disable tracing at the function level. When tracing is enabled, warmer functions will use NPM to install the X-Ray client and use it to trace requests (It takes any of the values supported by serverless as `boolean`, `Active`or `PassThrough` and defaults to the provider-level setting)
76
76
  * **verbose** If set to false, it disables the console.logs placed on this warmer lambda (defaults to `true`)
77
- * **logRetentionInDays** Set the retention time in days for the log group associated to this warmer lamba
77
+ * **logRetentionInDays** Set the retention time in days for the log group associated to this warmer lamba. Can be any of the values specified in the [AWS documentation](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html#API_PutRetentionPolicy_RequestSyntax).
78
78
  * **prewarm** If set to true, it warms up your lambdas right after deploying (defaults to `false`)
79
79
 
80
80
  There are also some options which can be set under `custom.warmup.<yourWarmer>` to be applied to all your lambdas or under `yourLambda.warmup.<yourWarmer>` to overridde the global configuration for that particular lambda. Keep in mind that in order to configure a warmer at the function level, it needed to be previously configured at the `custom` section or the pluging will error.
@@ -111,7 +111,7 @@ custom:
111
111
  timeout: 20
112
112
  tracing: true
113
113
  verbose: false # Disable the logs
114
- logRetentionInDays: 10
114
+ logRetentionInDays: 14
115
115
  prewarm: true # Run WarmUp immediately after a deploymentlambda
116
116
  clientContext:
117
117
  source: my-custom-source
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serverless-plugin-warmup",
3
- "version": "7.3.0",
3
+ "version": "8.0.0",
4
4
  "description": "Keep your lambdas warm during winter.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/schema.js CHANGED
@@ -109,10 +109,7 @@ function extendServerlessSchema(serverless) {
109
109
  environment: { $ref: '#/definitions/awsLambdaEnvironment' },
110
110
  tracing: { $ref: '#/definitions/awsLambdaTracing' },
111
111
  verbose: { type: 'boolean' },
112
- logRetentionInDays: {
113
- type: 'number',
114
- enum: [1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653],
115
- },
112
+ logRetentionInDays: { $ref: '#/definitions/awsLogRetentionInDays' },
116
113
  prewarm: { type: 'boolean' },
117
114
  };
118
115