-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yml
60 lines (56 loc) · 1.45 KB
/
template.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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: SpringBoot API with the aws-lambda-web-adapter library
Globals:
Api:
# API Gateway regional endpoints
EndpointConfiguration: REGIONAL
Parameters:
DatabaseUrl:
Type: String
AWSS3Bucket:
Type: String
AWSS3BucketBaseUrl:
Type: String
S3AccessPolicyArn:
Type: String
AWSBedrockModelId:
Type: String
ResendApiKey:
Type: String
MailFromUrl:
Type: String
AppUrl:
Type: String
Resources:
MmmFunction:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
MemorySize: 1024
Policies:
- AWSLambdaBasicExecutionRole
- AmazonBedrockFullAccess
- !Ref S3AccessPolicyArn
Timeout: 60
Environment:
Variables:
RUST_LOG: info
AWS_LWA_ASYNC_INIT: true
SPRING_DATASOURCE_URL: !Ref DatabaseUrl
AWS_S3_BUCKET: !Ref AWSS3Bucket
AWS_S3_BUCKET_BASE_URL: !Ref AWSS3BucketBaseUrl
AWS_BEDROCK_MODEL_ID: !Ref AWSBedrockModelId
RESEND_API_KEY: !Ref ResendApiKey
MAIL_FROM_URL: !Ref MailFromUrl
APP_URL: !Ref AppUrl
FunctionUrlConfig:
AuthType: NONE
Metadata:
DockerContext: .
Dockerfile: Dockerfile
Outputs:
MmmFunctionFunctionUrlEndpoint:
Description: "The function URL endpoint for MmmFunction."
Value:
Fn::GetAtt: MmmFunctionUrl.FunctionUrl