-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
48 lines (48 loc) · 1.21 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
service: nosolopau-siestacms
provider:
name: aws
runtime: nodejs12.x
region: ${env:AWS_REGION}
stage: ${opt:stage, env:ENV, 'dev'}
environment:
USE_S3: false
POSTS_S3_BUCKET: ${self:custom.postsBucket}
POSTS_FOLDER: './posts/'
POSTS_PATH: 'posts'
iamRoleStatements:
- Effect: "Allow"
Action:
- 's3:GetObject'
- 's3:ListBucket'
Resource:
- arn:aws:s3:::${self:custom.postsBucket}
- arn:aws:s3:::${self:custom.postsBucket}/*
plugins:
- serverless-offline
- serverless-domain-manager
functions:
app:
handler: src/index.handler
events:
- http: ANY /
- http: 'ANY {proxy+}'
custom:
postsBucket: ${self:service}-posts-${self:provider.stage}
serverless-offline:
noPrependStageInUrl: true
domain: siestacms.com
customDomain:
domainName: ${self:provider.stage}.${self:custom.domain}
certificateName: '*.${self:custom.domain}'
basePath: ''
stage: ${self:provider.stage}
createRoute53Record: true
endpointType: 'regional'
autoDomain: false
resources:
Resources:
PostsBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
BucketName: ${self:custom.postsBucket}