-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverlessExample.yml
45 lines (42 loc) · 1.81 KB
/
serverlessExample.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
# We're excited that this project has provided you enough value that you are looking at its code!
#
# This is a standard [Serverless Framework](https://www.serverless.com) project and you should
# feel welcome to customize it to your needs and delight.
#
# If you do something super cool and would like to share the capability, please open a PR against
# https://www.github.com/Nordstrom/serverless-artillery.
#
# Thanks!
# If the following value is changed, your service may be duplicated (this value is used to build the CloudFormation
# Template script's name)
service: serverless-artillery-1234RandomId
provider: # Using Node JS v4.3 on AWS
name: aws
runtime: nodejs6.10
iamRoleStatements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
Resource:
"Fn::Join":
- ':'
-
- "arn:aws:lambda"
- Ref: "AWS::Region"
- Ref: "AWS::AccountId"
- "function"
- "${self:service}-${opt:stage, self:provider.stage}-loadGenerator*" # must match function name
functions:
loadGenerator: # !!Do not edit this name!!
handler: handler.handler # the serverlessArtilleryLoadTester handler() method can be found in the handler.js source file
timeout: 300 # set timeout to be 5 minutes (max for Lambda)
# vpc: # Lambdas can be set to run from a private subnet and pass all the requests to 1 IP address
# securityGroupIds:
# - sg-XXXXXXXXXXXXXX
# subnetIds:
# - subnet-XXXXXXXXXXXXXX
environment:
# INFLUX_HOST: ${env:INFLUX_HOST} # it's possible to pass env variables to lambda functions
# INFLUX_USER: ${env:INFLUX_USER} # you can also pass your env variables to lambda variables
# INFLUX_PASSWORD: ${env:INFLUX_PASSWORD}
# INFLUX_DB: ${env:INFLUX_DB}