Repository navigation
fix(build): Keep the Bedrock grant of the Box gateway in its region and account - #2883
SaiAbhishek98 merged 3 commits into
Conversation
…nd account ## Problem agentcore/box-bedrock-policy.json lets the role of the Box gateway use bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream on all inference profiles and all foundation models, in all regions and in all accounts: arn:aws:bedrock:*:*:inference-profile/* arn:aws:bedrock:*::foundation-model/* The agent uses the model only through the `bedrock` target of the gateway. `build` writes that target for one region. The agent uses only the inference profiles of the account of the gateway. A code inspection found this problem. ## Solution boxBedrockPolicy(spec, region) gets the region of the `bedrock` target from the default targets writer. boxMemoryPolicy gets the region of the `agentcore` target from the same writer. When the writer has no region, it writes no Bedrock policy and no Memory policy. The policy has 3 statements: 1. BoxedAgentInferenceProfilesThroughGateway: the inference profiles in the region. One file is for all deploy targets, thus the ARN keeps "*" for the account. The condition of [e96cbdb](aws@e96cbdb) keeps the inference profile in the account of the gateway role: "aws:ResourceAccount": "${aws:PrincipalAccount}". 2. BoxedAgentModelsInRegionThroughGateway: the foundation models in the region, when the agent names the model ID. 3. BoxedAgentModelsThroughInferenceProfiles: the foundation models in all regions, only when the agent uses an inference profile of that account in the region: "StringLike": {"bedrock:InferenceProfileArn": "arn:aws:bedrock:<region>:${aws:PrincipalAccount}:inference-profile/*"}. IAM does not accept that value in an ArnLike condition. CreatePolicy and the stack give "The policy failed legacy parsing". The Bedrock example in the AWS documents also uses StringLike. A `us.` or `global.` inference profile can send the model operation to other regions. For a `global.` inference profile, Bedrock also examines arn:aws:bedrock:::foundation-model/<model>, which has no region. The "*" region agrees with that ARN. Each ARN has the partition of the region (aws, aws-cn, or aws-us-gov), from the partition data of the AWS SDK. boxTelemetryPolicy uses the same data. The policy file cannot contain the AWS::Partition value of the stack, because the L3 reads the file with PolicyDocument.fromJson, and that function does not replace such a value. boxGatewayIamWarnings counts the Bedrock file only for the Bedrock runtime host of the region that `build` writes. It counts the Memory file only for the Memory host of that region. Thus a target that signs Bedrock operations for a different region with the gateway role gets a warning, because the new policy does not let the role do these operations. The new boxGatewayBedrockHost(region) gives the host. The policy keeps the same 2 operations. The policy does not let the role use an `application-inference-profile`. The policy before this change did not let the role use one, and the CLI does not make one. ## Tests Before this change, each of these tests gives an incorrect result. After this change, each result is satisfactory: - boxMemory.test.ts, "boxBedrockPolicy": 1 test for each statement, and 1 test for the partition of cn-north-1 and us-gov-west-1. - boxNetworkWriters.test.ts, "writes the Bedrock policy for the region of the bedrock target it writes". - manager.boxNetwork.test.ts, "moves the Memory and Bedrock policies with their targets to the region of the targets". A deploy to a target in eu-west-1 moves the `bedrock` target from us-west-2, and the Bedrock policy moves with it. - network.test.ts, "a Bedrock runtime target needs bedrock:InvokeModel, which the Bedrock file grants in the build region only". Each of 9 mutations gives an incorrect result in 1 or more of these tests: no account condition, a wildcard region for the inference profiles, a wildcard region for the models, no inference profile condition, a wildcard account in that condition, ArnLike and not StringLike, a constant `arn:aws`, a constant region in the writer, and no host check in the warning. IAM: `aws iam simulate-custom-policy` on the us-west-2 policy gives `allowed` for these 7 items: the model in us-west-2 by its ID, the `us.` and `global.` inference profiles of the account in us-west-2, and the model in us-west-2, us-east-1, us-east-2, and in the region-less global ARN through such a profile. It gives `implicitDeny` for these 7 items: an inference profile of a different account, an inference profile in us-east-1, the model in us-east-1 and the global model with no inference profile, the model in us-east-1 through a profile of a different account or of us-east-1, and an `application-inference-profile`. `simulate-principal-policy` on the gateway role after the deploy gives the same 14 results. CreatePolicy accepts the policy. Live test in a dev account in us-west-2: a new project from the agent-python-strands-box-container template, with the L3 at [08f8b230](https://github.com/aws/agentcore-l3-cdk-constructs/commit/08f8b23002f9357b7607b9d073dfd77929629e6a). With the default model, global.anthropic.claude-sonnet-5-5, 6 invokes gave 391, 5555 (through the add_numbers tool), and Paris. Then amazon.nova-lite-v1:0 in `app/agent/model/load.py`, a deploy, and 3 invokes gave the same answers. CloudTrail shows 12 ConverseStream operations of the gateway role on these 2 model IDs, with no error code. The gateway log group shows 12 operations through the `bedrock` target, with no error. CloudTrail gives `"inferenceRegion": "us-west-2"` for each operation, thus the live test did not show a model operation in a different region. Only the simulation shows it. The teardown removed the stack and the 3 log groups that stay after the stack. Not done: `bun run test:e2e`, and a live test in aws-cn or aws-us-gov. `bun test` gives `5833 pass, 7 skip, 0 fail`. The typecheck, lint, and format checks are satisfactory.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## box-integration #2883 +/- ##
================================================
Coverage 96.79% 96.80%
================================================
Files 766 766
Lines 66803 66830 +27
================================================
+ Hits 64665 64692 +27
Misses 2138 2138 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
leo237
left a comment
There was a problem hiding this comment.
Review: scope the Bedrock grant of the Box gateway to its region and account
Verdict: approve. I found nothing blocking. The policy keeps the documented Bedrock paths working (in-region model, geographic us./eu./apac. profiles, global. profiles) and refuses direct calls to out-of-region models, profiles in other regions, and profiles of other accounts. The PR is up to date with box-integration (merge-base = e2ac9d78), and it reverts nothing.
IAM correctness, checked against the AWS docs
- System-defined profiles carry the caller's account. Prerequisites for inference profiles shows the system-defined
us.andglobal.profiles asarn:aws:bedrock:us-west-2:111122223333:inference-profile/us.anthropic..., "in the account111122223333", which is the caller's account. So statement 1 (aws:ResourceAccount == ${aws:PrincipalAccount}) matches them. Your live run backs this up: the gateway role had only the Bedrock and Memory files, and 8ConverseStreamcalls onglobal.anthropic.claude-sonnet-5-5succeeded. That run could only pass through statement 1. Note that this is your empirical result. The docs don't say outright thataws:ResourceAccountis filled in forInvokeModelon an inference profile. - Out-of-region models through a profile. The same page says: "When you specify an inference profile in the
Resourcefield ... you must also specify the foundation model in each Region associated with it". It also saysbedrock:InferenceProfileArn"can be included in a statement that scopes to thefoundation-modelresources", and its own example usesStringLike. Statement 3 follows that pattern. The condition value (arn:<partition>:bedrock:<region>:${aws:PrincipalAccount}:inference-profile/*) matches the in-region, same-account profile ARN that Bedrock puts in the key. global.profiles. Global cross-Region inference says Bedrock checks the profile, the source-region model, and the region-lessarn:aws:bedrock:::foundation-model/<model>. It also says "bedrock:InferenceProfileArn... is populated for the foundation model resource evaluations, but not for the inference profile resource evaluation". That fits the split here: no profile condition on statement 1, and the profile condition on statement 3. The*region in statement 3 matches the empty region, because a*in a Resource ARN matches zero or more characters (IAM Resource element).StringLikevsArnLike. The docs' own examples useStringLikefor this key. Because the value has a fixed partition, region, and account prefix,StringLikeis no wider thanArnLikehere. I didn't reproduce the "legacy parsing" failure you saw withArnLike, so I'm relying on your deploy log for that.- Application inference profiles are still not covered, as you noted.
inference-profile/*never matchedapplication-inference-profile/*, so this isn't a regression.
Region plumbing / silent failures
defaultTargetsWriternow takes the region for the Bedrock file fromnetworks[0].region, the same source thataddBoxGatewayTargetsandboxMemoryPolicyalready use (#2851).BoxNetwork.regionis a requiredstring, soregion === undefinedonly happens when there are no networks. In that case no Box runtime is being built and nothing needs the file. This matches the Memory handling.- Per-runtime networks (#2866): the comment "Every network of one build has the region build builds for" holds, since every network takes
project.region. One build therefore can't need two Bedrock regions. - A user-edited
bedrocktarget, or one in another region, now gets an IAM warning fromboxGatewayIamWarnings, which checks the host withboxGatewayBedrockHost(network.region). That's the right fallback: a loud warning, not a silent wildcard. The newnetwork.test.tscase covers it. - The route region (
${{ inputs.aws.region }}/writesBedrockRoute) is unchanged, and it is the same build region.
Tests
The new tests check each statement exactly (Sid, Resource, Condition), the aws-cn and aws-us-gov partitions, the writer's region, the deploy-time move from us-west-2 to eu-west-1 in manager.boxNetwork.test.ts, and the cross-region warning. The mutation table in the PR body is convincing. I found no unsafe test patterns: no hard-coded / paths, no splitting of paths or env on :, no shell or network calls.
Non-blocking
- Partition is now inconsistent with the Memory file.
boxBedrockPolicygets its partition from the region, butboxMemoryPolicystill hard-codesarn:aws:bedrock-agentcore:. Consider making Memory match in a follow-up (inline comment). - aws-cn endpoint.
boxGatewayBedrockHost(and the existing target endpoint) buildsbedrock-runtime.<region>.amazonaws.com. Incn-*the endpoint isamazonaws.com.cn, so the partition-aware ARNs don't yet give a working China path from start to finish. This predates the PR (inline comment). - No test for the no-region branch in
defaultTargetsWriter(no networks, so no Bedrock file). It's trivial and matches Memory, so this is optional. - Back-merge needed.
box-integration-development(435b6ba1) still has the oldBoxedAgentModelCallsThroughGatewaypolicy onarn:aws:bedrock:*:*:inference-profile/*andarn:aws:bedrock:*::foundation-model/*. This looks like a security fix outside the squash plan, so please port it to dev too. In dev,boxBedrockPolicytakes(spec, projectRoot), so the port won't be a clean cherry-pick.
CI
At review time, Linux, Windows, CodeQL/Analyze, and CodeBuild e2e pass. verify / macOS is still pending. Please confirm it goes green before merge.
…he Box gateway The comment of leo237 on boxMemory.ts: boxMemoryPolicy wrote "arn:aws:bedrock-agentcore:<region>" for each region. Thus `build` for cn-north-1 or us-gov-west-1 wrote a Bedrock policy with the correct partition, and a Memory policy with an incorrect partition. boxMemoryPolicy gets the partition from the region, with the partition data of the AWS SDK, the same as boxBedrockPolicy. Test: boxMemory.test.ts, "boxMemoryPolicy" > "names the partition of the region it is given", for cn-north-1 (aws-cn) and us-gov-west-1 (aws-us-gov). Before this change, the result of this test is incorrect.
The comment of leo237 on shortcuts.ts: boxGatewayBedrockHost wrote "bedrock-runtime.<region>.amazonaws.com" for each region, and boxGatewayAgentCoreHost wrote "bedrock-agentcore.<region>.amazonaws.com". In the aws-cn partition, the DNS suffix is "amazonaws.com.cn". Thus, for `build` in cn-north-1, the `bedrock` and `agentcore` targets had an incorrect endpoint. Also, boxGatewayIamWarnings compared a target host with an incorrect host, and gave a warning for a correct China host. This problem was on box-integration before this PR. The 2 functions get the DNS suffix from the partition data of the AWS SDK, as boxBedrockPolicy gets the partition. Tests. Before this change, the result of each test is incorrect: - shortcuts.test.ts, "Box gateway targets" > "take the DNS suffix of the partition of the region": cn-north-1 gives amazonaws.com.cn, us-gov-west-1 and us-west-2 give amazonaws.com. - network.test.ts, "the Bedrock and Memory files grant the amazonaws.com.cn hosts of a build for China": no warning. A constant "amazonaws.com" in each of the 2 functions gives an incorrect result in the 2 tests.
leo237
left a comment
There was a problem hiding this comment.
Re-review at 0b0b2b3. I looked at 555f19c6..0b0b2b31. Still approved.
Both earlier comments are fixed:
- 0d8c8d3:
boxMemoryPolicynow builds the ARN withpartition(region).name, so it uses the same partition as the Bedrock grant. The new test checksaws-cnandaws-us-gov. - 0b0b2b3:
boxGatewayBedrockHostandboxGatewayAgentCoreHostnow usepartition(region).dnsSuffix. Both the target endpoints and the host match inboxGatewayIamWarningsgo through these two helpers, so the warning check stays in step with the endpoints. The tests cover cn-north-1 (.amazonaws.com.cn), us-gov-west-1 and us-west-2, plus a China network-warnings case. Theegress.tsendpoint patterns already accept(?:\.cn)?.
The new code reuses @aws-sdk/util-endpoints partition(), the same call as src/core/partition.ts and boxTelemetry.ts, rather than adding a new table. An unknown region falls back to aws/amazonaws.com, which is fine. No other Box gateway host still hard-codes amazonaws.com. The two left in src/core/project (templates/export.ts and migrate/templateStore.ts) are outside this PR.
Non-blocking:
- In the ISO partitions (
c2s.ic.gov,sc2s.sgov.gov), the SDK gives the right suffix, but theegress.tspatterns only matchamazonaws.com(.cn). Those hosts would not be classified as AWS endpoints. AgentCore isn't offered there today, so this is just for later. - #2886 copies the Bedrock scoping into
boxMemory.tsbut still has thearn:aws:andamazonaws.comversions, so the partition handling here makes the gap with #2886 bigger. That is one more reason to land this PR and drop #2886's copy. - Still open from before: there is no test for the no-region branch, and this needs a back-merge to
box-integration-development.
The Bedrock route signing, ${{ inputs.aws.region }}, the xray grants and the #2851 Memory scoping are untouched by the new commits.
Merge state: the branch is 2 commits behind box-integration (#2884, which doesn't touch these files) and merges cleanly. At posting, CodeQL, Analyze and CodeBuild e2e pass, and verify / Linux|Windows|macOS are still pending. Please merge only after the verify checks pass.
Description
Problem. On
box-integration,agentcore/box-bedrock-policy.jsongives the role of the Box gatewaybedrock:InvokeModelandbedrock:InvokeModelWithResponseStream. The role can use them on all inference profiles and all foundation models, in all regions and in all accounts:The agent uses the model only through the
bedrocktarget of its Box gateway.buildwrites that target for one region, and the agent uses only the inference profiles of the account of the gateway. A code inspection found this problem. aws/agentcore-cli#2851 (e96cbdb9) gave the same limits tobox-memory-policy.json. This PR uses the same procedure for the Bedrock file.Change. 3 commits:
boxMemory.ts.amazonaws.com.cninaws-cn. This is the comment of leo237 onshortcuts.ts. This problem was onbox-integrationbefore this PR.In commit 1,
boxBedrockPolicy(spec, region)gets the region of thebedrocktarget from the default targets writer, at the same location whereboxMemoryPolicygets its region. For us-west-2, build writes this policy:{ "Version": "2012-10-17", "Statement": [ { "Sid": "BoxedAgentInferenceProfilesThroughGateway", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:us-west-2:*:inference-profile/*" ], "Condition": { "StringEquals": { "aws:ResourceAccount": "${aws:PrincipalAccount}" } } }, { "Sid": "BoxedAgentModelsInRegionThroughGateway", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:us-west-2::foundation-model/*" ] }, { "Sid": "BoxedAgentModelsThroughInferenceProfiles", "Effect": "Allow", "Action": [ "bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream" ], "Resource": [ "arn:aws:bedrock:*::foundation-model/*" ], "Condition": { "StringLike": { "bedrock:InferenceProfileArn": "arn:aws:bedrock:us-west-2:${aws:PrincipalAccount}:inference-profile/*" } } } ] }BoxedAgentInferenceProfilesThroughGatewayBoxedAgentModelsInRegionThroughGatewayBoxedAgentModelsThroughInferenceProfilesboxGatewayIamWarningscounts the Bedrock file only for the Bedrock runtime host of the build region. It counts the Memory file in the same manner. The newboxGatewayBedrockHost(region)gives that host.The decisions.
ResourceARN. Thus the profile ARN keeps*for the account, and"aws:ResourceAccount": "${aws:PrincipalAccount}"holds it to the account of the role, as inbox-memory-policy.json.StringLike, notArnLike, forbedrock:InferenceProfileArn. The IAM page on policy variables says that a variable can go into an ARN condition. But with${aws:PrincipalAccount}in the account part of anArnLikevalue,CreatePolicyand the stack giveThe policy failed legacy parsing. The simulator and Access Analyzer accept that policy, thus only a deploy found the problem.StringLikewith the same value is accepted, and the Bedrock example in the AWS documents usesStringLike. The value starts with a fixed partition, region, and account, thusStringLikeis not wider thanArnLikehere.us.orglobal.inference profile sends the model operation to other regions. Bedrock then examines the foundation model in each destination region, and puts the profile ARN inbedrock:InferenceProfileArn. For aglobal.profile, Bedrock also examinesarn:aws:bedrock:::foundation-model/<model>, which has no region. The*region agrees with that ARN.iam.PolicyDocument.fromJson. That function does not replace${AWS::Partition}. Thus the CLI writes the partition of the region from the partition data of the AWS SDK, asboxTelemetryPolicydoes. Forcn-north-1, the ARNs start witharn:aws-cn:bedrock:.application-inference-profileARN. The CLI does not make one, and no template names one. A user can type such an ARN as the model ID. That call is refused before and after this PR. To permit it, add oneapplication-inference-profile/*ARN to statement 1 and to the condition of statement 3.The AWS documents for each statement.
bedrock:InferenceProfileArncan limit afoundation-modelstatement to calls through a profile.arn:aws:bedrock:::foundation-model/<model>, which has no region.inference-profile,application-inference-profile, andfoundation-modelARN formats, andbedrock:InferenceProfileArnonInvokeModelandInvokeModelWithResponseStream.ResourceARN is only in the resource part, after the fifth colon. The page also says that a variable can be in a string or an ARN condition. IAM refuses it in the account part of anArnLikevalue, as the decisions above tell.*agrees with 0 or more characters in its part of the ARN.aws:ResourceAccountis in the request context for most API operations. Bedrock is not in the list of exceptions.aws:PrincipalAccountis in the context of all requests.Base. This PR starts from
box-integrationat e2ac9d78.Items to examine.
boxBedrockPolicyinsrc/core/project/boxMemory.ts.defaultTargetsWriterinsrc/core/project/boxNetworkWriters.ts.boxGatewayIamWarningsinsrc/core/project/boxNetwork/network.ts.boxGatewayBedrockHostandboxGatewayAgentCoreHostinsrc/handlers/project/shortcuts.ts.Related Issue
None. A code inspection of the Box gateway grants found this problem.
Documentation PR
Not applicable. This PR adds no command and no flag, and no document names the ARNs of the previous policy.
Type of Change
Testing
How have you tested the change?
bun test: 5836 pass, 7 skip, 0 fail, in 353 files. The 5 test files that this PR changes: 134 pass, 0 fail.bun run test:e2e, or explained why they are not applicable: I did not do these tests. They deploy resources in AWS. I did the live test below.bun run typecheckbun run lint:check: exit 0.bun run format:checkbun run audit: not done. This PR adds no package.bun run secrets:check: not done.bun run build: not done.src/assets/, I updated affected snapshots: this PR does not changesrc/assets/.manager.test.tsandboxNetworkSource.test.tsnamebox-bedrock-policy.json, but they examine only its name and its position inadditionalPolicies. They do not change.command.md(the release workflow regenerates it)The tests that change, and the cause of each change. Before its commit, each of these 10 tests gives
(fail). After its commit, each gives(pass).boxMemory.test.ts,boxBedrockPolicy: 3 tests, 1 for each statement, and 1 test for the partition ofcn-north-1andus-gov-west-1. These replace the test "grants the gateway role the model invoke actions in any region".boxNetworkWriters.test.ts: "writes the Bedrock policy for the region of the bedrock target it writes". This is the Bedrock copy of the Memory test of aws/agentcore-cli#2851.manager.boxNetwork.test.ts: "moves the Memory and Bedrock policies with their targets to the region of the targets". The Memory test of aws/agentcore-cli#2851 now also examines thebedrocktarget and the Bedrock policy. A deploy to a target in eu-west-1 moves both from us-west-2.network.test.ts: "a Bedrock runtime target needs bedrock:InvokeModel, which the Bedrock file grants in the build region only". This IAM-warning test gets 1 more case: abedrocktarget in us-east-1, with a build for us-west-2, gets the warning. Before this PR, the listed file counted for each region, because the policy allowed each region.boxMemory.test.ts,boxMemoryPolicy: "names the partition of the region it is given", forcn-north-1andus-gov-west-1(commit 2).shortcuts.test.ts: "take the DNS suffix of the partition of the region", forcn-north-1,us-gov-west-1, andus-west-2(commit 3).network.test.ts: "the Bedrock and Memory files grant the amazonaws.com.cn hosts of a build for China". A user target for the correct China host gets no warning (commit 3).The tests find each change. I made each of these 12 changes, one at a time, and ran the test files of this PR. For each change, 1 or more of the tests above gave
(fail). Then I removed the change.aws:ResourceAccountcondition*region for the inference profiles*region for the models by their IDbedrock:InferenceProfileArncondition*account in that conditionArnLikeand notStringLikearn:awspartitionarn:awsin the Memory ARNamazonaws.comin the Bedrock hostamazonaws.comin the AgentCore hostIAM simulation.
aws iam simulate-custom-policyon the us-west-2 policy, withaws:PrincipalAccount,aws:ResourceAccount, andbedrock:InferenceProfileArnin the context.simulate-principal-policyon the gateway role after the deploy gives the same 14 results. Both operations give the same result in each row.arn:aws:bedrock:us-west-2::foundation-model/<m>arn:aws:bedrock:us-west-2:<this>:inference-profile/us.<m>arn:aws:bedrock:us-west-2:<this>:inference-profile/global.<m>arn:aws:bedrock:us-west-2::foundation-model/<m>us.profile of this accountarn:aws:bedrock:us-east-1::foundation-model/<m>us.profile of this accountarn:aws:bedrock:us-east-2::foundation-model/<m>us.profile of this accountarn:aws:bedrock:::foundation-model/<m>global.profile of this accountarn:aws:bedrock:us-west-2:<other>:inference-profile/us.<m>arn:aws:bedrock:us-east-1:<this>:inference-profile/us.<m>arn:aws:bedrock:us-east-1::foundation-model/<m>arn:aws:bedrock:::foundation-model/<m>arn:aws:bedrock:us-east-1::foundation-model/<m>arn:aws:bedrock:us-east-1::foundation-model/<m>arn:aws:bedrock:us-west-2:<this>:application-inference-profile/abc123The policy before this PR gives
allowedfor all 6 of theimplicitDenyrows that are not theapplication-inference-profilerow.Live test. I did this test in a dev account in us-west-2, with the CLI of this branch, box 0.1.11-preview.10 for macOS on
PATH, and a local L3 frombox-integrationat 08f8b230.agentcore create --template agent-python-strands-box-container. The default model is theglobal.anthropic.claude-sonnet-5-5inference profile. Build wrote the policy above.391,5555(through theadd_numberstool), andParis, 2 times.app/agent/model/load.pyto the foundation modelamazon.nova-lite-v1:0, did a deploy again, and did 3 invokes. The agent gave 391, 5555 (throughadd_numbers), and Paris, in the<thinking>format of Nova.ConverseStreamoperations by the gateway role: 8 onglobal.anthropic.claude-sonnet-5-5and 4 onamazon.nova-lite-v1:0, with no error code. The gateway role has only the Bedrock policy and the Memory policy. The APPLICATION_LOGS log group of the Box gateway shows 12 operations through thebedrocktarget, with no error.agentcore remove all --yesandagentcore deploy --yesremoved the stack. I removed the 3 log groups that stay after the stack: the runtime log group, the CodeBuild log group, and the Lambda log group. No gateway, runtime, Memory, ECR repository, role, or credential provider of the project stays. The CDK assets in the bootstrap bucket stay, and Transaction Search stays on in the account.The first deploy used
ArnLike. CloudFormation stopped it withThe policy failed legacy parsing, and removed its resources. I removed that stack and changed the condition toStringLikebefore the commit.Not shown live. CloudTrail gives
"inferenceRegion": "us-west-2"for each operation of theglobal.profile. Thus the live test did not show a model operation in a different region. Bedrock examines the global model ARN, which has no region, for each operation of aglobal.profile, and the operations had no error. The simulation shows the other regions.aws-cnandaws-us-govhave unit tests only. The unit tests examine the partition of the policy ARNs and the DNS suffix of the target hosts. I did no live test in these partitions.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.