JSPM

serverless-cf-parameters

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q16049F
  • License MIT

Serverless's plugin to configure CloudFormation Parameters

Package Exports

  • serverless-cf-parameters

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-cf-parameters) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Serverless CF Parameters

Serverless plugin to set CloudFormation Parameters.

Install

  1. run npm install --sade-dev serverless-cf-parameters
  2. add serverless-cf-parameters in serverless.yml plugin section
    plugins:
        - serverless-cf-parameters

Whit this plugin you have 2 ways to set Parameters.

Interactive mode

When you run deploy or package, the plugin find Parameters in resources section from serverless.yml file.

Then then plugin ask for these parameters to define the values ​​for them.

Parameters in JSON

When you run deploy or package pass --cf-parameters flag and the JOSN path with the values for parameters.

an example:

this is your serverless.yml

#...

resources:
    Parameters:
        MyParameter:
            Type: String
            MinLength: 3
            MaxLength: 63
            AllowedPattern: "([a-zA-Z0-9]){1}([a-zA-Z0-9-])*"
        OtherParameter:
            Type: String
            MinLength: 3
            MaxLength: 63
            AllowedPattern: "([a-zA-Z0-9]){1}([a-zA-Z0-9-])*"

#...

your json file with parameters config looks like this:

{
    "MyParameter":"value for MyParameter",
    "OtherParameter":"value for OtherParameter"
}