-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathserverless.yml
77 lines (71 loc) · 2.03 KB
/
serverless.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
service: ${env:APP_NAME, 'tshExampleApp'}
configValidationMode: error
useDotenv: true
plugins:
- serverless-step-functions-local
- serverless-step-functions
- serverless-webpack
- serverless-offline
package:
individually: true
custom:
vpc:
securityGroupIds:
- ${env:SECURITY_GROUP_ID}
subnetIds:
- ${env:SUBNET_ID_1}
- ${env:SUBNET_ID_2}
webpack:
webpackConfig: "webpack.config.js"
packager: "npm"
stepFunctionsLocal:
externalInstance: true
accountId: 101010101010
region: us-east-1
stepFunctionsEndpoint: http://127.0.0.1:8083
TaskResourceMapping:
exampleStep: arn:aws:lambda:us-east-1:101010101010:function:${env:APP_NAME, 'tshExampleApp'}-${opt:stage, 'dev'}-example-step-lambda
# PLOP_ADD_WORKFLOW_STEP_LOCAL_STEP
provider:
name: aws
runtime: nodejs20.x
region: ${env:AWS_LAMBDAS_REGION, 'eu-west-1'}
stage: ${opt:stage, 'dev'}
memorySize: 256
timeout: 30
logRetentionInDays: 30
environment:
APP_NAME: ${env:APP_NAME, 'tshExampleApp'}
AWS_LAMBDAS_REGION: ${env:AWS_LAMBDAS_REGION, 'eu-west-1'}
iam:
role:
statements:
- Effect: Allow
Action:
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DeleteNetworkInterface
- ec2:DetachNetworkInterface
Resource: "*"
- Effect: Allow
Action:
- lambda:InvokeFunction
- states:StartExecution
Resource:
- "*"
functions:
- ${file(functions/migrations/function.yml)}
- ${file(functions/example-lambda/function.yml)}
- ${file(workflows/example-workflow/example-step/function.yml)}
# PLOP_ADD_LAMBDA
stepFunctions:
stateMachines:
ExampleWorkflow: ${file(workflows/example-workflow/workflow.yml)}
# PLOP_ADD_WORKFLOW_STATE_MACHINE
resources:
Outputs:
ExampleWorkflowStateMachine:
Description: Example workflow state machine Arn
Value:
Ref: ExampleWorkflow${self:service}${opt:stage, 'dev'}
# PLOP_ADD_WORKFLOW_RESOURCE