-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
103 lines (92 loc) · 3.23 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
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
100
101
102
103
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Curiousdvisor
Sample SAM Template Bedrock Agent deployment
Parameters:
Environment:
Type: String
Default: dev
Globals:
Function:
Timeout: 60
MemorySize: 128
Tracing: Active
Runtime: python3.10
Architectures:
- x86_64
Environment:
Variables:
POWERTOOLS_METRICS_NAMESPACE: bedrock-agent-demo
POWERTOOLS_SERVICE_NAME: bedrock-agent-demo
Api:
TracingEnabled: true
Resources:
LambdaLayers:
Type: AWS::Serverless::Application
Properties:
Location: layers/layers.yaml
Datastores:
Type: AWS::Serverless::Application
Properties:
Location: datastores/template.yaml
Parameters:
Environment: !Ref Environment
# FormsIngestion:
# Type: AWS::Serverless::Application
# Properties:
# Location: forms/template.yaml
# Parameters:
# DynamoDBTable: !GetAtt Datastores.Outputs.DynamoDBTable
# PowertoolsLayer: !GetAtt LambdaLayers.Outputs.PowertoolsLayer
# ModelLayer: !GetAtt LambdaLayers.Outputs.ModelLayer
# FormsIngestionBucketArn: !GetAtt Datastores.Outputs.FormsIngestionBucketArn
# FormsIngestionBucketName: !GetAtt Datastores.Outputs.FormsIngestionBucketName
KnowledgeBase:
Type: AWS::Serverless::Application
Properties:
Location: knowledgebase/template.yaml
Parameters:
Environment: !Ref Environment
OpenSearchLayer: !GetAtt LambdaLayers.Outputs.OpenSearchLayer
KnowledgeBaseBucketArn: !GetAtt Datastores.Outputs.KnowledgeBaseBucketArn
Agent:
Type: AWS::Serverless::Application
Properties:
Location: agent/template.yaml
Parameters:
Environment: !Ref Environment
KnowledgeBase: !GetAtt KnowledgeBase.Outputs.KnowledgeBaseId
ModelLayer: !GetAtt LambdaLayers.Outputs.ModelLayer
PowertoolsLayer: !GetAtt LambdaLayers.Outputs.PowertoolsLayer
DynamoDBTable: !GetAtt Datastores.Outputs.DynamoDBTable
SampleData:
Type: AWS::Serverless::Application
Properties:
Location: sample_data/template.yaml
Parameters:
Environment: !Ref Environment
TableName: !GetAtt Datastores.Outputs.DynamoDBTable
BucketName: !GetAtt Datastores.Outputs.KnowledgeBaseBucketName
BucketArn: !GetAtt Datastores.Outputs.KnowledgeBaseBucketArn
ModelLayer: !GetAtt LambdaLayers.Outputs.ModelLayer
AgentId: !GetAtt Agent.Outputs.AgentId
AgentArn: !GetAtt Agent.Outputs.AgentArn
DataSourceId: !GetAtt KnowledgeBase.Outputs.DataSourceId
KnowledgeBaseId: !GetAtt KnowledgeBase.Outputs.KnowledgeBaseId
KnowledgeBaseArn: !GetAtt KnowledgeBase.Outputs.KnowledgeBaseArn
ApplicationResourceGroup:
Type: AWS::ResourceGroups::Group
Properties:
Name:
Fn::Sub: ApplicationInsights-SAM-${AWS::StackName}
ResourceQuery:
Type: CLOUDFORMATION_STACK_1_0
ApplicationInsightsMonitoring:
Type: AWS::ApplicationInsights::Application
Properties:
ResourceGroupName:
Ref: ApplicationResourceGroup
AutoConfigurationEnabled: 'true'