-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplate.yml
More file actions
44 lines (40 loc) · 1.13 KB
/
template.yml
File metadata and controls
44 lines (40 loc) · 1.13 KB
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Runtime: provided.al2023
Timeout: 10 # 10 seconds
Architectures:
- arm64
Environment:
Variables:
SENDER_EMAIL: # set in Parameter overrides
SENDER_EMAIL_PASSWORD:
RECEIVER_EMAIL:
SMTP_HOST:
SMTP_PORT:
PRODUCT_NAME:
Resources:
FormMaillyFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: FormMaillyGo
PackageType: Zip
Handler: bootstrap # entrypoint executable
Policies:
- AWSLambdaBasicExecutionRole
FunctionUrlConfig: # creates a public HTTPS endpoint
AuthType: NONE
Cors:
AllowOrigins: ["*"]
AllowMethods: ["GET","POST"]
Events:
HealthApi:
Type: FunctionUrl # can also call via Events, optional
Outputs:
LambdaFunctionArn:
Description: ARN of the Lambda function
Value: !GetAtt FormMaillyFunction.Arn
FunctionUrl:
Description: HTTPS URL for the function
Value: !GetAtt FormMaillyFunctionUrl.FunctionUrl