File tree 2 files changed +34
-14
lines changed 2 files changed +34
-14
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,19 @@ Parameters:
5
5
Type : String
6
6
Default : " "
7
7
Description : The parameter name in System Manager used to store the API Key, leave blank to use a default key
8
+ ImageUri :
9
+ Type : String
10
+ Default : " "
11
+ Description : Specify a custom ECR image, if left blank defaults to 366590864501.dkr.ecr.us-east-1.amazonaws.com/bedrock-proxy-api:latest.
8
12
EnableImportedModels :
9
13
Type : String
10
14
Default : false
11
15
AllowedValues :
12
16
- true
13
17
- false
14
18
Description : If enabled, models imported into Bedrock will be available to use.
19
+ Conditions :
20
+ UseDefaultImage : !Equals [!Ref ImageUri, ""]
15
21
Resources :
16
22
VPCB9E5F0B4 :
17
23
Type : AWS::EC2::VPC
@@ -146,6 +152,7 @@ Resources:
146
152
- Action :
147
153
- bedrock:ListFoundationModels
148
154
- bedrock:ListInferenceProfiles
155
+ - bedrock:ListImportedModels
149
156
Effect : Allow
150
157
Resource : " *"
151
158
- Action :
@@ -155,6 +162,7 @@ Resources:
155
162
Resource :
156
163
- arn:aws:bedrock:*::foundation-model/*
157
164
- arn:aws:bedrock:*:*:inference-profile/*
165
+ - arn:aws:bedrock:*:*:imported-model/*
158
166
- Action :
159
167
- ssm:DescribeParameters
160
168
- ssm:GetParameters
@@ -182,14 +190,16 @@ Resources:
182
190
Architectures :
183
191
- arm64
184
192
Code :
185
- ImageUri :
186
- Fn::Join :
193
+ ImageUri : !If
194
+ - UseDefaultImage
195
+ - !Join
187
196
- " "
188
- - - 366590864501.dkr.ecr.
189
- - Ref : AWS::Region
197
+ - - " 366590864501.dkr.ecr."
198
+ - ! Ref AWS::Region
190
199
- " ."
191
- - Ref : AWS::URLSuffix
192
- - /bedrock-proxy-api:latest
200
+ - !Ref AWS::URLSuffix
201
+ - " /bedrock-proxy-api:latest"
202
+ - !Ref ImageUri
193
203
Description : Bedrock Proxy API Handler
194
204
Environment :
195
205
Variables :
Original file line number Diff line number Diff line change @@ -5,13 +5,19 @@ Parameters:
5
5
Type : String
6
6
Default : " "
7
7
Description : The parameter name in System Manager used to store the API Key, leave blank to use a default key
8
+ ImageUri :
9
+ Type : String
10
+ Default : " "
11
+ Description : Specify a custom ECR image, if left blank defaults to 366590864501.dkr.ecr.us-east-1.amazonaws.com/bedrock-proxy-api:latest.
8
12
EnableImportedModels :
9
13
Type : String
10
14
Default : false
11
15
AllowedValues :
12
16
- true
13
17
- false
14
18
Description : If enabled, models imported into Bedrock will be available to use.
19
+ Conditions :
20
+ UseDefaultImage : !Equals [!Ref ImageUri, ""]
15
21
Resources :
16
22
VPCB9E5F0B4 :
17
23
Type : AWS::EC2::VPC
@@ -182,6 +188,7 @@ Resources:
182
188
- Action :
183
189
- bedrock:ListFoundationModels
184
190
- bedrock:ListInferenceProfiles
191
+ - bedrock:ListImportedModels
185
192
Effect : Allow
186
193
Resource : " *"
187
194
- Action :
@@ -191,6 +198,7 @@ Resources:
191
198
Resource :
192
199
- arn:aws:bedrock:*::foundation-model/*
193
200
- arn:aws:bedrock:*:*:inference-profile/*
201
+ - arn:aws:bedrock:*:*:imported-model/*
194
202
- Action :
195
203
- ssm:DescribeParameters
196
204
- ssm:GetParameters
@@ -247,14 +255,16 @@ Resources:
247
255
- Name : ENABLE_IMPORTED_MODELS
248
256
Value : !Ref EnableImportedModels
249
257
Essential : true
250
- Image :
251
- Fn::Join :
252
- - " "
253
- - - 366590864501.dkr.ecr.
254
- - Ref : AWS::Region
255
- - " ."
256
- - Ref : AWS::URLSuffix
257
- - /bedrock-proxy-api-ecs:latest
258
+ Image : !If
259
+ - UseDefaultImage
260
+ - !Join
261
+ - " "
262
+ - - "366590864501.dkr.ecr."
263
+ - !Ref AWS::Region
264
+ - " ."
265
+ - !Ref AWS::URLSuffix
266
+ - " /bedrock-proxy-api:latest"
267
+ - !Ref ImageUri
258
268
Name : proxy-api
259
269
PortMappings :
260
270
- ContainerPort : 80
You can’t perform that action at this time.
0 commit comments