-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
43 lines (39 loc) · 872 Bytes
/
serverless.yml
File metadata and controls
43 lines (39 loc) · 872 Bytes
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
service: ServerlessPing
custom: ${file(env.yml)}
provider:
name: aws
stage: dev
runtime: nodejs6.10
region: us-west-2
environment: ${file(env.yml)}
iamRoleStatements:
- Effect: 'Allow'
Action: 'SNS:Publish'
Resource:
Fn::Join:
- ':'
- - 'arn:aws:sns'
- Ref: 'AWS::Region'
- Ref: 'AWS::AccountId'
- ${self:custom.TOPIC_NAME}
- Effect: 'Allow'
Action: 'S3:PutObject'
Resource:
Fn::Join:
- ''
- - 'arn:aws:s3:::'
- ${self:custom.BUCKET_NAME}
- '/*'
functions:
list:
handler: list.handler
ping:
handler: ping.handler
events:
- sns: ${self:custom.TOPIC_NAME}
resources:
Resources:
PingBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.BUCKET_NAME}