-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
41 lines (37 loc) · 1.63 KB
/
template.yaml
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sendmail-app
Sample SAM Template for sendmail-app
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 10
Resources:
SendmailFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: ./
Handler: main
Runtime: go1.x
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /sendmail
Method: POST
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
ReCAPTCHA_SECRET: 'reCaptcha Secret Key'
SES_REGION: 'us-west-1'
MAIL_SUBJECT: 'Test email'
IS_HTML: true
MAIL_FROM: '[email protected]'
CC_ADDRESSES: '<[email protected]>, Bob <[email protected]>'
BCC_ADDRESSES: '<[email protected]>, Bob <[email protected]>'
TO_ADDRESSES: '<[email protected]>, Bob <[email protected]>'
SMTP_USER: '[email protected]'
SMTP_PASSWORD: 'password'
SMTP_HOST: 'sender.com'
SMTP_PORT: '587'