Skip to content

Commit 3b60dbe

Browse files
authored
fix: add missing AgentCore regions to match AWS documentation (#833)
Add 6 regions (ap-northeast-2, ca-central-1, eu-north-1, eu-west-2, eu-west-3, sa-east-1) to AgentCoreRegionSchema to match the official AWS Bedrock Agentcore supported regions documentation. Closes #822
1 parent 6729eb2 commit 3b60dbe

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

src/schema/llm-compacted/aws-targets.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,22 @@ interface AwsDeploymentTarget {
2323

2424
// ─────────────────────────────────────────────────────────────────────────────
2525
// SUPPORTED REGIONS
26+
// https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html
2627
// ─────────────────────────────────────────────────────────────────────────────
2728

2829
type AgentCoreRegion =
2930
| 'ap-northeast-1'
31+
| 'ap-northeast-2'
3032
| 'ap-south-1'
3133
| 'ap-southeast-1'
3234
| 'ap-southeast-2'
35+
| 'ca-central-1'
3336
| 'eu-central-1'
37+
| 'eu-north-1'
3438
| 'eu-west-1'
39+
| 'eu-west-2'
40+
| 'eu-west-3'
41+
| 'sa-east-1'
3542
| 'us-east-1'
3643
| 'us-east-2'
3744
| 'us-west-2';

src/schema/schemas/__tests__/aws-targets.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ import { describe, expect, it } from 'vitest';
1010
describe('AgentCoreRegionSchema', () => {
1111
const validRegions = [
1212
'ap-northeast-1',
13+
'ap-northeast-2',
1314
'ap-south-1',
1415
'ap-southeast-1',
1516
'ap-southeast-2',
17+
'ca-central-1',
1618
'eu-central-1',
19+
'eu-north-1',
1720
'eu-west-1',
21+
'eu-west-2',
22+
'eu-west-3',
23+
'sa-east-1',
1824
'us-east-1',
1925
'us-east-2',
2026
'us-west-2',
@@ -26,8 +32,8 @@ describe('AgentCoreRegionSchema', () => {
2632

2733
it('rejects unsupported regions', () => {
2834
expect(AgentCoreRegionSchema.safeParse('us-west-1').success).toBe(false);
29-
expect(AgentCoreRegionSchema.safeParse('eu-west-2').success).toBe(false);
30-
expect(AgentCoreRegionSchema.safeParse('sa-east-1').success).toBe(false);
35+
expect(AgentCoreRegionSchema.safeParse('af-south-1').success).toBe(false);
36+
expect(AgentCoreRegionSchema.safeParse('me-south-1').success).toBe(false);
3137
});
3238

3339
it('rejects empty string', () => {

src/schema/schemas/aws-targets.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@ import { z } from 'zod';
33

44
// ============================================================================
55
// AgentCore Regions
6+
// Keep in sync with: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agentcore-regions.html
67
// ============================================================================
78

89
export const AgentCoreRegionSchema = z.enum([
910
'ap-northeast-1',
11+
'ap-northeast-2',
1012
'ap-south-1',
1113
'ap-southeast-1',
1214
'ap-southeast-2',
15+
'ca-central-1',
1316
'eu-central-1',
17+
'eu-north-1',
1418
'eu-west-1',
19+
'eu-west-2',
20+
'eu-west-3',
21+
'sa-east-1',
1522
'us-east-1',
1623
'us-east-2',
1724
'us-west-2',

0 commit comments

Comments
 (0)