File tree Expand file tree Collapse file tree 2 files changed +34
-14
lines changed Expand file tree Collapse file tree 2 files changed +34
-14
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,19 @@ Parameters:
55 Type : String
66 Default : " "
77 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.
812 EnableImportedModels :
913 Type : String
1014 Default : false
1115 AllowedValues :
1216 - true
1317 - false
1418 Description : If enabled, models imported into Bedrock will be available to use.
19+ Conditions :
20+ UseDefaultImage : !Equals [!Ref ImageUri, ""]
1521Resources :
1622 VPCB9E5F0B4 :
1723 Type : AWS::EC2::VPC
@@ -146,6 +152,7 @@ Resources:
146152 - Action :
147153 - bedrock:ListFoundationModels
148154 - bedrock:ListInferenceProfiles
155+ - bedrock:ListImportedModels
149156 Effect : Allow
150157 Resource : " *"
151158 - Action :
@@ -155,6 +162,7 @@ Resources:
155162 Resource :
156163 - arn:aws:bedrock:*::foundation-model/*
157164 - arn:aws:bedrock:*:*:inference-profile/*
165+ - arn:aws:bedrock:*:*:imported-model/*
158166 - Action :
159167 - ssm:DescribeParameters
160168 - ssm:GetParameters
@@ -182,14 +190,16 @@ Resources:
182190 Architectures :
183191 - arm64
184192 Code :
185- ImageUri :
186- Fn::Join :
193+ ImageUri : !If
194+ - UseDefaultImage
195+ - !Join
187196 - " "
188- - - 366590864501.dkr.ecr.
189- - Ref : AWS::Region
197+ - - " 366590864501.dkr.ecr."
198+ - ! Ref AWS::Region
190199 - " ."
191- - Ref : AWS::URLSuffix
192- - /bedrock-proxy-api:latest
200+ - !Ref AWS::URLSuffix
201+ - " /bedrock-proxy-api:latest"
202+ - !Ref ImageUri
193203 Description : Bedrock Proxy API Handler
194204 Environment :
195205 Variables :
Original file line number Diff line number Diff line change @@ -5,13 +5,19 @@ Parameters:
55 Type : String
66 Default : " "
77 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.
812 EnableImportedModels :
913 Type : String
1014 Default : false
1115 AllowedValues :
1216 - true
1317 - false
1418 Description : If enabled, models imported into Bedrock will be available to use.
19+ Conditions :
20+ UseDefaultImage : !Equals [!Ref ImageUri, ""]
1521Resources :
1622 VPCB9E5F0B4 :
1723 Type : AWS::EC2::VPC
@@ -182,6 +188,7 @@ Resources:
182188 - Action :
183189 - bedrock:ListFoundationModels
184190 - bedrock:ListInferenceProfiles
191+ - bedrock:ListImportedModels
185192 Effect : Allow
186193 Resource : " *"
187194 - Action :
@@ -191,6 +198,7 @@ Resources:
191198 Resource :
192199 - arn:aws:bedrock:*::foundation-model/*
193200 - arn:aws:bedrock:*:*:inference-profile/*
201+ - arn:aws:bedrock:*:*:imported-model/*
194202 - Action :
195203 - ssm:DescribeParameters
196204 - ssm:GetParameters
@@ -247,14 +255,16 @@ Resources:
247255 - Name : ENABLE_IMPORTED_MODELS
248256 Value : !Ref EnableImportedModels
249257 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
258268 Name : proxy-api
259269 PortMappings :
260270 - ContainerPort : 80
You can’t perform that action at this time.
0 commit comments