-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
53 lines (42 loc) · 1.18 KB
/
serverless.yml
File metadata and controls
53 lines (42 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
service: rust-serverless-example
provider:
name: aws
region: eu-west-1
runtime: rust
architecture: arm64 # x86_64 or arm64
memorySize: 128
lambdaHashingVersion: '20201221'
plugins:
- ../serverless-rust
- '@stefannienhuis/serverless-offline'
package:
individually: true
functions:
ping:
handler: ping # Rust package name
name: ${self:service}-${opt:stage}-ping
events:
- httpApi:
method: 'GET'
path: '/getping' # /ping is reserved
hello:
handler: hello # Rust package name
name: ${self:service}-${opt:stage}-hello
events:
- httpApi:
method: 'POST'
path: '/hello'
custom:
stageOptions:
target:
dev: aarch64-apple-darwin # Local target
default: aarch64-unknown-linux-musl # Lambda target
linker:
dev: clang # Linker for local target
default: aarch64-unknown-linux-musl-gcc # Linker for Lambda target
serverless-offline:
useRIE: true
rust:
dockerless: true
target: ${self:custom.stageOptions.target.${opt:stage}, self:custom.stageOptions.target.default}
linker: ${self:custom.stageOptions.linker.${opt:stage}, self:custom.stageOptions.linker.default}