acassio / serverless-encrypt-enviroment-variables

Serverless plugin that get encrypted ssm parameters and keep then encrypted on lambda console with a valid hash.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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...         

About

Serverless plugin that get encrypted ssm parameters and keep then encrypted on lambda console with a valid hash.


Languages

Language:JavaScript 100.0%