feat: add GovCloud multi-partition support#908
Merged
aidandaly24 merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Contributor
Package TarballHow to installnpm install https://github.com/aws/agentcore-cli/releases/download/pr-908-tarball/aws-agentcore-0.9.1.tgz |
Contributor
Coverage Report
|
6241e3b to
fcbcdc6
Compare
jariy17
previously approved these changes
Apr 22, 2026
Collaborator
jariy17
left a comment
There was a problem hiding this comment.
LGTM, just rebase if you can
fcbcdc6 to
50ed2b8
Compare
jariy17
previously approved these changes
Apr 23, 2026
50ed2b8 to
8fd5408
Compare
8fd5408 to
8fc528f
Compare
8fc528f to
1cba7c1
Compare
Add partition-aware ARN construction, endpoint URL generation, and console URL generation to support aws-us-gov (and future aws-cn) partitions. - Create src/cli/aws/partition.ts with getPartition, arnPrefix, dnsSuffix, serviceEndpoint, and consoleDomain utilities - Replace all hardcoded arn:aws: in ARN template literals with arnPrefix(region) - Update ARN regex patterns to accept any partition (arn:[^:]+:) - Replace hardcoded amazonaws.com in endpoint URLs with serviceEndpoint() - Replace hardcoded console.aws.amazon.com with consoleDomain() - Add us-gov-west-1 to AgentCoreRegionSchema, BEDROCK_REGIONS, and LLM compacted types - Add aws-us-gov to cdk.json target-partitions - Fix execution-role-policy.json to use partition wildcard (arn:*) - Add 15 unit tests for partition utilities - Document multi-partition rules and checklists in AGENTS.md
1cba7c1 to
9dd51f5
Compare
jariy17
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds multi-partition support to the AgentCore CLI, enabling deployment to GovCloud (
us-gov-west-1) and laying groundwork for China (cn-*) regions.Core change: New
src/cli/aws/partition.tsutility module that maps AWS regions to partition-specific values (ARN prefix, DNS suffix, console domain). All hardcodedarn:aws:,amazonaws.com, andconsole.aws.amazon.comreferences in source files have been replaced with dynamic calls to this utility.Changes
src/cli/aws/partition.ts— central partition utility withgetPartition,arnPrefix,dnsSuffix,serviceEndpoint,consoleDomainsrc/cli/aws/__tests__/partition.test.ts— 15 unit tests covering all 3 partitions × 5 functionsarnPrefix(region)instead of hardcodedarn:aws:arn:[^:]+:to accept any partitionserviceEndpoint()instead of hardcodedamazonaws.comtrace-url.tsupdated to useconsoleDomain()for partition-correct CloudWatch deep linksus-gov-west-1added toAgentCoreRegionSchema,BEDROCK_REGIONS, LLM compacted types, and testsaws-us-govtocdk.jsontarget-partitionsexecution-role-policy.jsonupdated to usearn:*:partition wildcard for cross-partition IAM compatibilityAGENTS.mdwith rules and checklists for adding new regions/partitionsCompanion PR
Supersedes
Related Issue
Closes #
Documentation PR
None required — documentation added inline in AGENTS.md
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.