-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathserverless.yml
42 lines (36 loc) · 978 Bytes
/
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
service: api-danielhollcraft
frameworkVersion: ">=1.8.0 <2.0.0"
custom:
stage: ${opt:stage, self:provider.stage}
provider:
name: aws
runtime: nodejs6.10
environment:
SLS_STAGE: ${self:custom.stage}
SUBJECT: 'danielhollcraft.com contact form'
FROM: ${file(./secret.yml):FROM}
TO: ${file(./secret.yml):TO}
API_KEY: ${file(./secret.yml):API_KEY}
DOMAIN: mg.danielhollcraft.com
functions:
contact:
handler: endpoints/contact/index.handler
events:
- http:
cors: true
path: /contact
method: post
plugins:
- serverless-offline
#resources:
# Resources:
# SSLCert:
# Type: "AWS::CertificateManager::Certificate"
# Properties:
# DomainName: api.danielhollcraft.com
# CustomDomainMap:
# Type: "AWS::ApiGateway::BasePathMapping"
# Properties:
# DomainName: api.danielhollcraft.com
# Stage: ${self:custom.stage}
# RestApiId: {Ref: ApiGatewayRestApi}