2.0.0 • Published 5 years ago

serverless-encrypt-enviroment-variables v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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