serverless-encrypt-enviroment-variables

2.0.0 • Public • Published

serverless-encrypt-enviroment-variables

Serverless plugin that get encrypted ssm parameters (kms) and keep them encrypted on lambda console with a valid hash.

add plugin:

plugins:
  - serverless-encrypt-enviroment-variables

usage with global variables:

custom:
  env:
    keyArn: "arn:aws:kms......"
    variables:
       - VAR1: "encrypt:/VARIABLE/ENCRYPTED"
       - VAR2: "ssm:/VARIABLE/DECRYPTED"
       - VAR3: "NORMAL_VALUE"   

usage with function local variables:

custom:
  env:
    keyArn: "arn:aws:kms......"
    functions:
       - name: "example1"
         variables:
            - VAR1: "encrypt:/VARIABLE/ENCRYPTED"
            - VAR2: "ssm:/VARIABLE/DECRYPTED"
            - VAR3: "NORMAL_VALUE"
       - name: "example2"
         variables:
            - VAR1: "encrypt:/VARIABLE/ENCRYPTED"
            - VAR2: "ssm:/VARIABLE/DECRYPTED"
            - VAR3: "NORMAL_VALUE"
              
functions:
  example1:
    handler: bin/service
    name: ${self:provider.stage}-${self:service.name}-example1
    description: Example...
  example2:
    handler: bin/service
    name: ${self:provider.stage}-${self:service.name}-example2
    description: Example 2...         

/serverless-encrypt-enviroment-variables/

    Package Sidebar

    Install

    npm i serverless-encrypt-enviroment-variables

    Weekly Downloads

    1

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    6.17 kB

    Total Files

    3

    Last publish

    Collaborators

    • acassio