Created
July 24, 2019 08:18
-
-
Save mattsan/b414d2313e284915446d659f3ab9d78a to your computer and use it in GitHub Desktop.
Serverless で layers に gems を配置する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: emattsan | |
provider: | |
name: aws | |
runtime: ruby2.5 | |
stage: ${opt:stage, 'development'} | |
region: ap-northeast-1 | |
package: | |
exclude: | |
- package.json | |
- yarn.lock | |
- node_modules/** | |
- Gemfile* | |
- vendor/** | |
# add symbolic link | |
# $ (mkdir -p layers/ruby/gems && cd layers/ruby/gems && ln -s ../../../vendor/bundle/ruby/2.5.0 2.5.0) | |
layers: | |
gems: | |
path: layers | |
name: ${self:service}-${self:provider.stage}-gems | |
compatibleRuntimes: | |
- ruby2.5 | |
allowedAccounts: | |
- '*' | |
functions: | |
fake: | |
handler: handler.fake | |
layers: | |
- {Ref: GemsLambdaLayer} | |
hello: | |
handler: handler.hello | |
layers: | |
- {Ref: GemsLambdaLayer} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment