Socket
Socket
Sign inDemoInstall

serverless-plugin-resource-deep-merge

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-resource-deep-merge

Serverless plugin which allows to modify CloudFormation templates


Version published
Weekly downloads
34
decreased by-35.85%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless plugin resource deep merge

Installation

npm i -D serverless-plugin-resource-deep-merge
plugins:
  - serverless-plugin-resource-deep-merge

Usage

serverless.yaml

functions:
  urlrewrite:
    handler: handler.urlrewrite
    events:
      - cloudFront:
          eventType: origin-request
          origin: https://${self:custom.s3Origin}
          isDefaultOrigin: true

☝️ This Lambda@Edge function will create a CloudFront distribution which is, unfortunately, hardly customizable due to the default behavior of resources.extensions:

As per doc:

Here's how the extension logic is defined:

Resource attributeOperation
PropertiesMerge. If a property with the same name exists in the resource, the value will be replaced with the extension value.

Properties.DistributionConfig replacement equals to handcrafted CloudFront config, so deepmerge of config might be more useful. For example, if you want to add a custom alias to your CloudFront distribution, add the following section to the serverless.yaml

custom:
  mergeResources:
    CloudFrontDistribution:
      Properties:
        DistributionConfig:
          Aliases:
            - some.domain.com

Contributors

LICENSE

WTFPL

FAQs

Package last updated on 30 Nov 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