Skip to content

Instantly share code, notes, and snippets.

@ngw
Created March 7, 2019 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngw/8e762faca258493c7159581aed1fccea to your computer and use it in GitHub Desktop.
Save ngw/8e762faca258493c7159581aed1fccea to your computer and use it in GitHub Desktop.
plugins:
- serverless-hooks-plugin
- serverless-kms-secrets
custom:
kmsSecrets: ${file(kms-secrets.${opt:stage, self:provider.stage}.${opt:region, self:provider.region}.yml)}
hooks:
package:initialize:
- docker run -v `pwd`:`pwd` -w `pwd` lambci/lambda:build-ruby2.5 bundle install --deployment
package:finalize:
- rm -rf vendor
- rm -rf .bundle
provider:
name: aws
runtime: ruby2.5
iamRoleStatements:
- Effect: Allow
Action:
- KMS:Decrypt
Resource: ${self:custom.kmsSecrets.keyArn}
# you can define service wide environment variables here
environment:
TOKEN: ${self:custom.kmsSecrets.secrets.SEEKER_TOKEN}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment