🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

serverless-api-gateway-execution-log-manager

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-api-gateway-execution-log-manager

Serverless plugin for setting log retention and deleting API Gateway execution logs during stack update/removal

2.0.2
latest
Source
npm
Version published
Weekly downloads
40
2.56%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-api-gateway-execution-log-manager

serverless license build status npm version

This Serverless Framework plugin manages the API Gateway execution log groups automatically created in CloudWatch when execution logging is enabled in serverless.yml. When enabling these logs, API Gateway automatically creates a CloudWatch log group named API-Gateway-Execution-Logs_[RestApiId]/[stage]. This log group is not part of the CloudFormation stack deployed by Serverless Framework.

The plugin does the following:

  • applies the log retention policy configured in serverless.yml (by default the API Gateway execution log group is configured with Expire=Never)
  • deletes the log group upon stack removal

Installation

npm install serverless-api-gateway-execution-log-manager --save-dev

Compatibility with Serverless Framework

Version 1.1.1 is compatible with Serverless Framework v3, but it uses the legacy logging interface. Version 2.0.0 and later uses the new logging interface.

serverless-api-gateway-execution-log-managerServerless Framework
≤ v1.1.0v1.x, v2.x
v1.1.1v1.x, v2.x, v3.x
≥ v2.0.0v3.x

Usage

Add the following to your serverless.yml:

plugins:
  - serverless-api-gateway-execution-log-manager

provider:
  logs:
    restApi:
      level: INFO
      executionLogging: true
      fullExecutionData: true

  logRetentionInDays: 7 # also applied to the execution logs with the plugin

This plugin does not have any configuration options (yet).

Keywords

serverless

FAQs

Package last updated on 08 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts