Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-lambda-edge-pre-existing-cloudfront

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-lambda-edge-pre-existing-cloudfront

The Serverless Framework plugin which creates Lambda@Edge against pre-existing CloudFront.

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9K
decreased by-27.86%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless Lambda Edge PreExisting CloudFront

A Serverless Framework plugin which associates Lambda@Edge against pre-existing CloudFront distributions.

Install

You can install this plugin from npm registry.

$ npm install --save-dev serverless-lambda-edge-pre-existing-cloudfront

How it works

Configure serverless.yml

functions:
  viewerRequest:
    handler: lambdaEdge/viewerRequest.handler
    events:
      - preExistingCloudFront:
          distributionId: xxxxxxx # CloudFront distribution ID you want to associate
          eventType: viewer-request # Choose event to trigger your Lambda function, which are `viewer-request`, `origin-request`, `origin-response` or `viewer-response`
          pathPattern: '*' # Specifying the CloudFront behavior
          includeBody: false # Whether including body or not within request

plugins:
  - serverless-lambda-edge-pre-existing-cloudfront

Run deploy

$ serverless deploy

You can specify additional configurations a lambdaEdgePreExistingCloudFront value in the custom section of your serverless.yml file. A validStages value allows you to specify valid stage names for deploy Lambda@Edge.

lambdaEdgePreExistingCloudFront:
  validStages:
    - staging
    - production

FAQs

Package last updated on 24 Sep 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc