Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sensitive env vars passed as params
# serverless.yml
service:
name: myService
awsKmsKeyArn: arn:aws:kms:us-east-1:XXXXXX:key/some-hash # Optional KMS key arn which will be used for encryption for all functions
frameworkVersion: ">=1.0.0 <2.0.0"
provider:
name: aws
runtime: nodejs6.10
stage: dev # Set the default stage used. Default is dev
region: us-east-1 # Overwrite the default region used. Default is us-east-1
memorySize: 512 # Overwrite the default memory size. Default is 1024
timeout: 10 # The default is 6
environment: # Service wide environment variables
NON_SENSITVE: 12345678
VERY_SENSITVE:
sensitive: true
value: mysecret
functions:
foo: # A Function (uses default KMS, only has default environment)
handler: users.create # The file and module for this specific function.
bar: # A Function
handler: users.create # The file and module for this specific function.
awsKmsKeyArn: arn:aws:kms:us-east-1:XXXXXX:key/some-hash # Optional KMS key arn which will be used for encryption (overwrites the one defined on the service level)
environment: # Function level environment variables
NON_SENSITVE_2: # We should also support sensitive as false, either we only have a string (non-sensitive impled), or sensitive is set to false
sensitive: false
value: 12345678
VERY_SENSITIVE_2:
sensitive: true
value: mysecret2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment