-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
99 lines (91 loc) · 2.41 KB
/
Copy pathserverless.yml
File metadata and controls
99 lines (91 loc) · 2.41 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
service: medical-agent
package:
individually: true
custom:
stages:
- dev
- production
stage: ${opt:stage, 'dev'}
build:
esbuild:
minify: true
sourcemap: true
keepNames: true
external:
- '@voltagent/core'
- '@voltagent/vercel-ai'
- '@ai-sdk/amazon-bedrock'
provider:
name: aws
stage: dev
runtime: nodejs22.x
region: us-east-1
environment:
NODE_OPTIONS: "--enable-source-maps"
TABLE_NAME: medical-agent-memory
iamRoleStatements:
- Effect: Allow
Action:
- bedrock:InvokeModel
- dynamodb:Query
- dynamodb:PutItem
- dynamodb:GetItem
- events:PutEvents
- s3:GetObject
Resource: "*"
functions:
medicalAnalysis:
handler: src/index.handler
events:
- eventBridge:
eventBus: default
pattern:
source: ["aws.s3"]
detail-type: ["Object Created"]
detail:
bucket:
name: [!Ref LabResultsBucket]
object:
key: [{ "wildcard": "*.json"}]
appointment:
handler: src/appointment.handler
events:
- eventBridge:
eventBus: default
pattern:
source: ["medical.analysis"]
detail-type: ["Medical Emergency Alert", "Medical Priority Appointment", "Medical Routine Appointment", "Medical General Event"]
resources:
Resources:
MedicalMemoryTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: medical-agent-memory
AttributeDefinitions:
- AttributeName: patient_id
AttributeType: S
- AttributeName: record_id
AttributeType: S
KeySchema:
- AttributeName: patient_id
KeyType: HASH
- AttributeName: record_id
KeyType: RANGE
BillingMode: PAY_PER_REQUEST
TimeToLiveSpecification:
AttributeName: ttl
Enabled: true
LabResultsBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:service}-lab-results-${self:provider.stage}
NotificationConfiguration:
EventBridgeConfiguration:
EventBridgeEnabled: true
PublicAccessBlockConfiguration:
BlockPublicAcls: true
BlockPublicPolicy: true
IgnorePublicAcls: true
RestrictPublicBuckets: true
VersioningConfiguration:
Status: Enabled