-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
120 lines (115 loc) · 4.01 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# serverless.yml
service:
name: architectureStockPrice
provider:
name: aws
runtime: java8
stage: dev
region: ap-southeast-2
memorySize: 1524
timeout: 10 # The default is 6 seconds. Note: API Gateway current maximum is 30 seconds
profile: personal
package:
artifact: target/architecture-stock-price-master-1-SNAPSHOT.jar
functions:
getStockPrice: # A Function
handler: au.com.infomedia.architecture.StockPriceHandler
events: # The Events that trigger this Function
- http: # This creates an API Gateway HTTP endpoint which can be used to trigger this function. Learn more in "events/apigateway"
path: getStockPrice
method: get
cors: true
# private: true # Requires clients to add API keys values in the `x-api-key` header of their request
# authorizer: # An AWS API Gateway custom authorizer function
# name: authorizerFunc # The name of the authorizer function (must be in this service)
# arn: xxx:xxx:Lambda-Name # Can be used instead of name to reference a function outside of service
# resultTtlInSeconds: 0
# identitySource: method.request.header.Authorization
# identityValidationExpression: someRegex
# - s3:
# bucket: photos
# event: s3:ObjectCreated:*
# rules:
# - prefix: uploads/
# - suffix: .jpg
# - schedule:
# name: my scheduled event
# description: a description of my scheduled event's purpose
# rate: rate(10 minutes)
# enabled: false
# input:
# key1: value1
# key2: value2
# stageParams:
# stage: dev
# inputPath: '$.stageVariables'
# - sns:
# topicName: aggregate
# displayName: Data aggregation pipeline
# - sqs:
# arn: arn:aws:sqs:region:XXXXXX:myQueue
# batchSize: 10
# - stream:
# arn: arn:aws:kinesis:region:XXXXXX:stream/foo
# batchSize: 100
# startingPosition: LATEST
# enabled: false
# - alexaSkill:
# appId: amzn1.ask.skill.xx-xx-xx-xx
# enabled: true
# - alexaSmartHome:
# appId: amzn1.ask.skill.xx-xx-xx-xx
# enabled: true
# - iot:
# name: myIoTEvent
# description: An IoT event
# enabled: true
# sql: "SELECT * FROM 'some_topic'"
# sqlVersion: beta
# - cloudwatchEvent:
# event:
# source:
# - "aws.ec2"
# detail-type:
# - "EC2 Instance State-change Notification"
# detail:
# state:
# - pending
# # Note: you can either use "input" or "inputPath"
# input:
# key1: value1
# key2: value2
# stageParams:
# stage: dev
# inputPath: '$.stageVariables'
# - cloudwatchLog:
# logGroup: '/aws/lambda/hello'
# filter: '{$.userIdentity.type = Root}'
# - cognitoUserPool:
# pool: MyUserPool
# trigger: PreSignUp
#
## The "Resources" your "Functions" use. Raw AWS CloudFormation goes in here.
#resources:
# Resources:
# usersTable:
# Type: AWS::DynamoDB::Table
# Properties:
# TableName: usersTable
# AttributeDefinitions:
# - AttributeName: email
# AttributeType: S
# KeySchema:
# - AttributeName: email
# KeyType: HASH
# ProvisionedThroughput:
# ReadCapacityUnits: 1
# WriteCapacityUnits: 1
# # The "Outputs" that your AWS CloudFormation Stack should produce. This allows references between services.
# Outputs:
# UsersTableArn:
# Description: The ARN for the User's Table
# Value:
# "Fn::GetAtt": [ usersTable, Arn ]
# Export:
# Name: ${self:service}:${opt:stage}:UsersTableArn # see Fn::ImportValue to use in other services and http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html for documentation on use.