-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
64 lines (57 loc) · 1.25 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
---
service: emojo
plugins:
- serverless-dotenv-plugin
- serverless-offline
provider:
name: aws
stage: dev
runtime: nodejs14.x
region: eu-west-1
iamRoleStatements:
- Effect: "Allow"
Action:
- "s3:PutObject"
- "s3:PutObjectAcl"
Resource:
Fn::Join:
- ""
- - "arn:aws:s3:::"
- Ref: ResizedS3Bucket
- "/*"
environment:
GITHUB_TOKEN: ${env:GITHUB_TOKEN}
GITHUB_REPO: ${env:GITHUB_REPO}
GITHUB_REPO_DIR: ${env:GITHUB_REPO_DIR}
GITHUB_REPO_BRANCH: ${env:GITHUB_REPO_BRANCH}
ACCESS_TOKEN: ${env:ACCESS_TOKEN}
VERIFICATION_TOKEN: ${env:VERIFICATION_TOKEN}
S3_BUCKET:
Ref: ResizedS3Bucket
functions:
index:
handler: src/handler.handler
events:
- http:
path: slack/emojo
method: POST
resources:
Resources:
ResizedS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:service}-${self:provider.stage}
Outputs:
ResizedS3BucketName:
Value:
Ref: ResizedS3Bucket
package:
excludeDevDependencies: true
exclude:
- coverage/**
- .circleci/**
- .git/**
custom:
serverless-offline:
# dontPrintOutput: true
port: ${env:WEBSERVER_PORT, '5020'}