-
Notifications
You must be signed in to change notification settings - Fork 5
/
template.yaml
44 lines (41 loc) · 1.09 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
42
43
44
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: LambdaRAG - RAG Demo
Globals:
Function:
Architectures:
- arm64
AutoPublishAlias: live
DeploymentPreference:
Type: AllAtOnce
Environment:
Variables:
NODE_ENV: production
AWS_LWA_PORT: 8080
AWS_LWA_READINESS_CHECK_PATH: /is_it_up
AWS_LWA_INVOKE_MODE: response_stream
LD_PRELOAD: /opt/lib/libcrypteia.so
SECRET: x-crypteia-ssm:/lambda-rag/OPENAI_API_KEY
Timeout: 120
Resources:
Lambda:
Type: AWS::Serverless::Function
Metadata:
Dockerfile: Dockerfile
DockerContext: .
Properties:
FunctionUrlConfig:
AuthType: NONE
InvokeMode: RESPONSE_STREAM
MemorySize: 1792
PackageType: Image
Policies:
- SSMParameterReadPolicy:
ParameterName: lambda-rag/OPENAI_API_KEY
Outputs:
LambdaRAGLambdaArn:
Description: Lambda Function Arn
Value: !GetAtt Lambda.Arn
LambdaRAGInvokeUrl:
Description: Lambda Function URL
Value: !GetAtt LambdaUrl.FunctionUrl