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

@agiledigital/serverless-parameter-subscriber

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agiledigital/serverless-parameter-subscriber

serverless plugin to make allow Lambdas to included dynamically updated parameters from the paramter store.

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by33.33%
Maintainers
8
Weekly downloads
 
Created
Source

Serverless Parameter Subscriber

CircleCI npm version semantic-release

This is a serverless plugin that enables you to subscribe environment variables in Lambdas to Systems Manager Parameter Store values. This enables you to share configuration values that are used across multiple Lambdas in the Parameter store and access them as environment variables. Need to update the parameter value? Simply update the value once in the Parameter Store and within seconds, all subscribing Lambdas will be using the updated value without the extra overhead of calling out the the parameter store for every request.

Table of Contents

Install

Run npm install in your Serverless project.

$ npm install --save-dev @agiledigital/serverless-parameter-subscriber

Add the plugin to your serverless.yml file

plugins:
  - '@agiledigital/serverless-parameter-subscriber'

Setup

The following is an example serverless.yml file demonstrating this plugin's usage. You can try the example included in the repository.

service: params

provider:
  name: aws
  runtime: nodejs10.x
  region: ap-southeast-2
  stage: ${opt:stage, 'dev'}

functions:
  one:
    handler: handler.one
    # the following `parameters` value is where the magic happens.
    # ENV_VAR_ONE is the name of the environment variable in the function
    # ParamValue will be the name of the parameter in the Parameter Store.
    parameters:
      ENV_VAR_ONE: ParamValue

  two:
    handler: handler.two
    parameters:
      # this parameter will be defined outside of this service.
      ENV_VAR_TWO: ExternalParamValue

resources:
  Resources:
    # We create the parameter that the funtions subscribe to here, but the
    # parameter can be created any way you like including in another service.
    ParamValue:
      Type: AWS::SSM::Parameter
      Properties:
        Description: Dynamic parameter
        Name: ParamValue
        Type: String
        Value: hello, dave

plugins:
  - '@agiledigital/serverless-parameter-subscriber'

Keywords

FAQs

Package last updated on 31 Mar 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