Skip to content

Commit 9a43222

Browse files
authored
Update validate.ts
Allow ARNs from Bedrock Marketplace, which are different because models are deployed using SageMaker Inference behind the scenes.
1 parent 74faacd commit 9a43222

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/utils/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s
8989
*/
9090
export function validateBedrockArn(arn: string, region?: string) {
9191
// Validate ARN format
92-
const arnRegex = /^arn:aws:bedrock:([^:]+):([^:]*):(?:([^/]+)\/([\w.\-:]+)|([^/]+))$/
92+
const arnRegex = /^arn:aws:(?:bedrock|sagemaker):([^:]+):([^:]*):(?:([^/]+)\/([\w.\-:]+)|([^/]+))$/
9393
const match = arn.match(arnRegex)
9494

9595
if (!match) {

0 commit comments

Comments
 (0)