-
Notifications
You must be signed in to change notification settings - Fork 0
Diagnose why Bedrock denies the model the product depends on #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| name: Bedrock Access Diagnosis | ||
|
|
||
| # Why can this account not invoke the model the product depends on? | ||
| # | ||
| # MEASURED 2026-08-21: `us.openai.gpt-5.6-luna` and `us.openai.gpt-5.6-terra` | ||
| # both return AccessDeniedException — "not available for this account ... contact | ||
| # AWS Sales" — on InvokeModel AND Converse in us-east-1, while | ||
| # `list-foundation-models` happily LISTS all three OpenAI ids. Listing is not | ||
| # access. | ||
| # | ||
| # That matters more than an error usually would, because of what bedrock.tf | ||
| # already records: `completeViaBedrock` treats AccessDeniedException as | ||
| # PERMANENT, returns null, and every caller in ai.ts degrades to sources-only. | ||
| # The failure is silent by design, so the product looks like it works while | ||
| # Tenure AI is never intelligent on any page. | ||
| # | ||
| # Three hypotheses, checked separately because they need different fixes: | ||
| # 1. ENTITLEMENT — model access is granted per account, per model, and for | ||
| # some third-party models needs a commercial agreement. IAM cannot fix it. | ||
| # 2. REGION — `us.` profiles route to us-east-1, us-east-2 and us-west-2 | ||
| # (bedrock.tf:55). Entitlement can differ per region. | ||
| # 3. POLICY — a permissions boundary on the IAM user, or an Organizations SCP, | ||
| # can deny what an identity policy allows. Neither shows up in the role's | ||
| # own policy document, which is why bedrock-iam.test.ts can pass while the | ||
| # call is denied. | ||
| # | ||
| # READ-ONLY. Every call below is a get/list/describe. No inference is issued, so | ||
| # unlike bedrock-model-probe.yml this costs nothing and mutates nothing. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: bedrock-access-diagnosis | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| diagnose: | ||
| name: Why is the model denied | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 12 | ||
| env: | ||
| AWS_REGION: us-east-1 | ||
| AWS_DEFAULT_REGION: us-east-1 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Configure AWS credentials | ||
| uses: ./.github/actions/aws-auth | ||
| with: | ||
| access-key-id: ${{ secrets.ACCESSKEYID }} | ||
| secret-access-key: ${{ secrets.SECRETACCESSKEY }} | ||
| region: ${{ secrets.AWS_REGION || 'us-east-1' }} | ||
|
|
||
| - name: Who am I | ||
| run: | | ||
| set -uo pipefail | ||
| aws sts get-caller-identity --output json || true | ||
|
|
||
| - name: 1. ENTITLEMENT — the BARE foundation-model ids, which is what GetFoundationModel takes | ||
| run: | | ||
| set -uo pipefail | ||
| # The earlier probe asked about `us.openai...` and got ResourceNotFound, | ||
| # because GetFoundationModel takes a FOUNDATION model id and `us.` is an | ||
| # inference PROFILE. Ask the right question. | ||
| for M in openai.gpt-5.6-luna openai.gpt-5.6-terra openai.gpt-5.6-sol anthropic.claude-haiku-4-5; do | ||
| echo "── $M ──" | ||
| aws bedrock get-foundation-model --model-identifier "$M" \ | ||
| --query 'modelDetails.{id:modelId,lifecycle:modelLifecycle.status,inference:inferenceTypesSupported,streaming:responseStreamingSupported}' \ | ||
| --output json 2>&1 || true | ||
| done | ||
|
|
||
| - name: 1b. ENTITLEMENT — what does the account list as ON_DEMAND vs INFERENCE_PROFILE | ||
| run: | | ||
| set -uo pipefail | ||
| echo "── models this account lists for ON_DEMAND ──" | ||
| aws bedrock list-foundation-models --by-inference-type ON_DEMAND \ | ||
| --query 'modelSummaries[?contains(modelId, `openai`)].modelId' --output text 2>&1 || true | ||
| echo "" | ||
| echo "── inference profiles visible ──" | ||
| aws bedrock list-inference-profiles \ | ||
| --query 'inferenceProfileSummaries[?contains(inferenceProfileId, `openai`)].{id:inferenceProfileId,status:status,type:type}' \ | ||
| --output json 2>&1 || true | ||
|
|
||
| - name: 2. REGION — every region the us. profile routes to | ||
| run: | | ||
| set -uo pipefail | ||
| # bedrock.tf:55 — the `us.` profiles route to us-east-1, us-east-2 and | ||
| # us-west-2. Entitlement is per region, so a denial in one is not a | ||
| # denial in all. Ask each directly rather than assuming. | ||
| for R in us-east-1 us-east-2 us-west-2; do | ||
| echo "══ $R ══" | ||
| echo " foundation model:" | ||
| aws bedrock get-foundation-model --region "$R" --model-identifier openai.gpt-5.6-luna \ | ||
| --query 'modelDetails.modelId' --output text 2>&1 | head -2 | sed 's/^/ /' | ||
| echo " inference profile:" | ||
| aws bedrock get-inference-profile --region "$R" --inference-profile-identifier us.openai.gpt-5.6-luna \ | ||
| --query '{id:inferenceProfileId,status:status,models:models[].modelArn}' --output json 2>&1 | head -12 | sed 's/^/ /' | ||
|
Comment on lines
+98
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- workflow shell settings and relevant region-scan code ---'
sed -n '1,155p' .github/workflows/bedrock-access-diagnosis.yml
printf '%s\n' '--- shell pipeline behavior probe ---'
bash -o pipefail -c 'false | head -2 | sed "s/^/ /"; printf "unreachable\n"' >/tmp/pipefail_probe.out 2>/tmp/pipefail_probe.err
status=$?
printf 'status=%s\n' "$status"
cat /tmp/pipefail_probe.out
cat /tmp/pipefail_probe.err
exit 0Repository: Tenurework/Tenure Length of output: 7326 🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '--- GitHub Actions shell invocation references in repository ---'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' \
'shell:|pipefail|regional scan|bedrock-access-diagnosis' .github README.md 2>/dev/null || true
printf '%s\n' '--- errexit plus pipefail probe ---'
set +e
bash -eo pipefail -c 'false | head -2 | sed "s/^/ /"; printf "unreachable\n"' >/tmp/pipefail_e.out 2>/tmp/pipefail_e.err
status=$?
set -e
printf 'status=%s\n' "$status"
cat /tmp/pipefail_e.out
cat /tmp/pipefail_e.err
printf '%s\n' '--- no errexit plus pipefail probe ---'
set +e
bash -o pipefail -c 'false | head -2 | sed "s/^/ /"; printf "reachable\n"' >/tmp/pipefail_noe.out 2>/tmp/pipefail_noe.err
status=$?
set -e
printf 'status=%s\n' "$status"
cat /tmp/pipefail_noe.out
cat /tmp/pipefail_noe.errRepository: Tenurework/Tenure Length of output: 3850 🌐 Web query:
💡 Result: In GitHub Actions, the shell invocation behavior regarding Citations:
🏁 Script executed: #!/bin/bash
set -u
printf '%s\n' '--- workflow-level and job-level shell settings ---'
rg -n '^[[:space:]]*(defaults:|run:|shell:|jobs:|diagnose:)' .github/workflows/bedrock-access-diagnosis.yml
printf '%s\n' '--- exact effective shell-option probe ---'
# This models an unspecified GitHub Actions Bash step: the runner supplies -e,
# while the workflow body supplies -u and pipefail.
set +e
bash -e -c 'set -uo pipefail; false | head -2 | sed "s/^/ /"; printf "unreachable\n"' >/tmp/gha_default_probe.out 2>/tmp/gha_default_probe.err
status=$?
set -e
printf 'status=%s\n' "$status"
cat /tmp/gha_default_probe.out
cat /tmp/gha_default_probe.errRepository: Tenurework/Tenure Length of output: 393 Continue the regional scan after expected AWS CLI failures. The default Bash shell enables 🤖 Prompt for AI Agents |
||
| done | ||
|
|
||
| - name: 3. POLICY — permissions boundary and organisation SCPs | ||
| run: | | ||
| set -uo pipefail | ||
| # A boundary or an SCP denies what an identity policy allows, and neither | ||
| # appears in the role's own document — which is exactly why | ||
| # bedrock-iam.test.ts can pass while the call is refused. | ||
| ARN=$(aws sts get-caller-identity --query Arn --output text 2>/dev/null || echo "") | ||
| echo "caller: $ARN" | ||
| NAME="${ARN##*/}" | ||
| echo "── permissions boundary on the calling identity ──" | ||
| aws iam get-user --user-name "$NAME" \ | ||
| --query 'User.{user:UserName,boundary:PermissionsBoundary}' --output json 2>&1 | head -12 || true | ||
| echo "" | ||
| echo "── is this account in an Organization? ──" | ||
| aws organizations describe-organization --output json 2>&1 | head -12 || true | ||
| echo "" | ||
| echo "── effective policies AWS itself reports for the Bedrock action ──" | ||
| # simulate-principal-policy evaluates identity policy + boundary + SCP | ||
| # together. It answers the question directly rather than by inference. | ||
| aws iam simulate-principal-policy \ | ||
| --policy-source-arn "$ARN" \ | ||
| --action-names bedrock:InvokeModel \ | ||
| --resource-arns "arn:aws:bedrock:us-east-1::foundation-model/openai.gpt-5.6-luna" \ | ||
| --query 'EvaluationResults[].{action:EvalActionName,decision:EvalDecision,matched:MatchedStatements[].SourcePolicyType}' \ | ||
| --output json 2>&1 | head -20 || true | ||
|
Comment on lines
+124
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
file=".github/workflows/bedrock-access-diagnosis.yml"
printf '%s\n' '--- workflow lines 1-170 ---'
sed -n '1,170p' "$file"
printf '%s\n' '--- relevant AWS command occurrences ---'
rg -n -C 3 'get-inference-profile|simulate-principal-policy|InvokeModel|inference-profile|foundation-model|us\.openai|us-east-2|us-west-2' "$file"Repository: Tenurework/Tenure Length of output: 11667 🏁 Script executed: #!/bin/bash
set -eu
file=".github/workflows/bedrock-access-diagnosis.yml"
sed -n '1,170p' "$file"
rg -n -C 3 'get-inference-profile|simulate-principal-policy|InvokeModel|inference-profile|foundation-model|us\.openai|us-east-2|us-west-2' "$file"Repository: Tenurework/Tenure Length of output: 11597 🌐 Web query:
💡 Result: To enable cross-Region inference in Amazon Bedrock, you must grant permissions to both the inference profile (the "source") and the individual foundation models (the "destinations") in each Region supported by that profile [1][2][3]. IAM Policy Requirements A standard IAM policy for cross-Region inference requires a multi-statement approach: 1. Inference Profile Permission: Grant bedrock:InvokeModel to the ARN of the inference profile in the requesting Region [2][3]. 2. Foundation Model Permissions: Grant bedrock:InvokeModel to the foundation model ARNs in every Region used by the profile [1][2]. 3. Condition Key: It is highly recommended to use the bedrock:InferenceProfileArn condition key to restrict foundation model access so that they can only be invoked through the authorized inference profile [1][2][4]. Example Policy Structure (Geographic) { "Version": "2012-10-17", "Statement": [ { "Sid": "GrantInferenceProfileAccess", "Effect": "Allow", "Action": "bedrock:InvokeModel", "Resource": ["arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-sonnet-4-5-20250929-v1:0"] }, { "Sid": "GrantModelAccess", "Effect": "Allow", "Action": "bedrock:InvokeModel", "Resource": [ "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-4-5-20250929-v1:0", "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-sonnet-4-5-20250929-v1:0" ], "Condition": { "StringEquals": { "bedrock:InferenceProfileArn": "arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-sonnet-4-5-20250929-v1:0" } } } ] } Global Inference Considerations For Global cross-Region inference, you must also grant access to a global foundation model ARN (e.g., arn:aws:bedrock:::foundation-model/MODEL-ID) and often use the condition "aws:RequestedRegion": "unspecified" to handle dynamic routing [4][3]. Simulation and Diagnostics The iam:SimulatePrincipalPolicy API can be used to evaluate effective permissions [5]. However, when diagnosing Bedrock cross-Region access, relying solely on simulation may be insufficient because: - It may not fully account for cross-Region inference profile requirements (the dual-resource constraint) [6]. - It does not evaluate trust policies or model access states [6]. - When performing cross-account simulations, OrganizationsDecisionDetail and PermissionsBoundaryDecisionDetail are used to identify which policy type (e.g., SCPs or boundaries) contributed to an allow or deny decision [5]. If the simulation occurs within a single account, these fields may be empty or not returned depending on the resource scope [5]. For precise troubleshooting, AWS recommends directly reading the policy documents and verifying the inference profile's destination regions using bedrock:GetInferenceProfile [6]. Citations:
🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- Bedrock configuration references ---'
rg -n -C 5 'us\.openai|gpt-5\.6|inference.?profile|bedrock' --glob '!*.lock' .
printf '%s\n' '--- workflow syntax and line-focused context ---'
nl -ba .github/workflows/bedrock-access-diagnosis.yml | sed -n '118,134p'Repository: Tenurework/Tenure Length of output: 50376 🏁 Script executed: #!/bin/bash
set -eu
rg -n -C 5 'us\.openai|gpt-5\.6|inference.?profile|bedrock' --glob '!*.lock' .
nl -ba .github/workflows/bedrock-access-diagnosis.yml | sed -n '118,134p'Repository: Tenurework/Tenure Length of output: 50376 🌐 Web query:
💡 Result: These terms refer to components within the AWS IAM Policy Simulator's output, specifically within the evaluation decision structures that detail how different policy types influence whether an action is allowed [1]. These fields are typically returned by the simulate-principal-policy API call when analyzing how IAM policies, Service Control Policies (SCPs), and permissions boundaries affect access [1]. OrganizationsDecisionDetail: This structure provides specific information on how AWS Organizations, and specifically Service Control Policies (SCPs), impacted the simulation result [1]. It is only relevant if the account being simulated is part of an AWS Organization [1]. Within this, the AllowedByOrganizations boolean field explicitly indicates whether the simulated operation was allowed or denied by the applicable SCPs [1]. PermissionsBoundaryDecisionDetail: This structure outlines the influence of a permissions boundary applied to an IAM user or role [1]. The AllowedByPermissionsBoundary boolean field indicates whether the action is permitted by the boundary [1]. A value of true signifies that the boundary did not deny the action and included an Allow statement matching the request [1]. A value of false indicates that the action was either not explicitly allowed or was explicitly denied by the boundary, effectively causing the action to be denied regardless of any identity-based policies [1]. These fields are part of the broader EvaluationResults, which provide a granular breakdown of how each policy type (identity-based, SCP, permissions boundary, etc.) contributes to the final authorization decision [1]. Citations: 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
workflow = Path(".github/workflows/bedrock-access-diagnosis.yml").read_text()
terraform = Path("infrastructure/terraform/bedrock.tf").read_text()
resource_line = re.search(
r'--resource-arns\s+"([^"]+)"', workflow
)
workflow_resources = [resource_line.group(1)] if resource_line else []
tf_resources = re.findall(
r'"(arn:aws:bedrock:[^"]+/(?:inference-profile|foundation-model)/[^"]+)"',
terraform,
)
print("workflow simulation resources:")
for value in workflow_resources:
print(" ", value)
print("terraform Bedrock runtime resources:")
for value in tf_resources:
print(" ", value)
print("profile simulated:", any("/inference-profile/" in x for x in workflow_resources))
print("all Terraform runtime resources simulated:", set(tf_resources) <= set(workflow_resources))
print("Terraform runtime resource count:", len(tf_resources))
PYRepository: Tenurework/Tenure Length of output: 398 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
workflow = Path(".github/workflows/bedrock-access-diagnosis.yml").read_text()
terraform = Path("infrastructure/terraform/bedrock.tf").read_text()
match = re.search(r'--resource-arns\s+"([^"]+)"', workflow)
workflow_resources = [match.group(1)] if match else []
tf_resources = re.findall(
r'"(arn:aws:bedrock:[^"]+/(?:inference-profile|foundation-model)/[^"]+)"',
terraform,
)
print("workflow simulation resources:")
for value in workflow_resources:
print(" ", value)
print("terraform Bedrock runtime resources:")
for value in tf_resources:
print(" ", value)
print("profile simulated:", any("/inference-profile/" in x for x in workflow_resources))
print("all Terraform runtime resources simulated:", set(tf_resources) <= set(workflow_resources))
print("Terraform runtime resource count:", len(tf_resources))
PYRepository: Tenurework/Tenure Length of output: 398 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
from pathlib import Path
import re
workflow = Path(".github/workflows/bedrock-access-diagnosis.yml").read_text()
terraform = Path("infrastructure/terraform/bedrock.tf").read_text()
workflow_resources = re.findall(r'--resource-arns\s+"([^"]+)"', workflow)
tf_literal_resources = re.findall(
r'"(arn:aws:bedrock:[^"]*(?:inference-profile|foundation-model)/[^"]+)"',
terraform,
)
tf_interpolated_resources = re.findall(
r'"([^"]*\$\{local\.region\}[^"]*(?:inference-profile|foundation-model)/[^"]+)"',
terraform,
)
print("workflow simulation resource count:", len(workflow_resources))
for value in workflow_resources:
print(" ", value)
print("literal Terraform runtime resources:", len(tf_literal_resources))
for value in tf_literal_resources:
print(" ", value)
print("interpolated Terraform runtime resources:", len(tf_interpolated_resources))
for value in tf_interpolated_resources:
print(" ", value)
print("workflow query contains organization detail:",
"OrganizationsDecisionDetail" in workflow)
print("workflow query contains boundary detail:",
"PermissionsBoundaryDecisionDetail" in workflow)
PYRepository: Tenurework/Tenure Length of output: 1221 🌐 Web query:
💡 Result: When using the IAM Citations:
Simulate the inference-profile request and all routed model resources. The simulation checks only the 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Summary | ||
| if: always() | ||
| run: | | ||
| { | ||
| echo "### Bedrock access diagnosis" | ||
| echo "" | ||
| echo "Read-only. Three hypotheses checked separately: account entitlement," | ||
| echo "region, and policy (boundary / SCP). The logs above carry the answers." | ||
| echo "" | ||
| echo "Reminder of why this matters: \`completeViaBedrock\` treats" | ||
| echo "AccessDeniedException as PERMANENT and returns null, and every caller in" | ||
| echo "\`ai.ts\` degrades to sources-only — so this failure is SILENT and the" | ||
| echo "product looks like it works while Tenure AI never reasons." | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
|
Comment on lines
+131
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Write the diagnostic results to the step summary. This step writes only fixed explanatory text. It does not publish the entitlement, region, or policy outputs that the workflow collected. Persist each diagnostic command output and append it to 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
sed -n '55,90p' .github/workflows/bedrock-access-diagnosis.ymlRepository: Tenurework/Tenure
Length of output: 1990
🌐 Web query:
AWS Bedrock GetFoundationModelAvailability API authorizationStatus entitlementAvailability agreementAvailability regionAvailability semantics💡 Result:
The AWS Bedrock GetFoundationModelAvailability API is used to retrieve the availability status of a specific foundation model within Amazon Bedrock [1][2]. The response provides details on whether a model is authorized for use, its entitlement, any associated agreements, and its availability in the current region [1][3][2]. The response includes the following fields and semantics: - modelId: The unique identifier of the foundation model being queried [1][3]. - agreementAvailability: An object detailing the status of the model agreement [1][3]. It includes a status (which can be AVAILABLE, PENDING, NOT_AVAILABLE, or ERROR) and an optional errorMessage if the status is in an error or unavailable state [4][3][5]. - authorizationStatus: A string indicating the authorization status of the model [1][3]. Valid values are AUTHORIZED or NOT_AUTHORIZED [1][3]. - entitlementAvailability: A string indicating whether the user is entitled to use the model [1][3]. Valid values are AVAILABLE or NOT_AVAILABLE [1][3]. - regionAvailability: A string indicating if the model is available in the region [1][3]. Valid values are AVAILABLE or NOT_AVAILABLE [1][4][3]. This API is commonly used to verify access before attempting to use a model, ensuring that both legal agreements and service entitlements are in place [2].
Citations:
🏁 Script executed:
Repository: Tenurework/Tenure
Length of output: 651
🌐 Web query:
site:docs.aws.amazon.com/bedrock/latest/APIReference/API_GetFoundationModelAvailability.html GetFoundationModelAvailability IAM permission authorizationStatus💡 Result:
The IAM permission required to call the GetFoundationModelAvailability action in Amazon Bedrock is bedrock:GetFoundationModelAvailability [1][2][3]. When you call this API, the response includes an authorizationStatus field, which indicates whether the caller is authorized to use the specified foundation model [4]. This field is a string with two valid values: AUTHORIZED or NOT_AUTHORIZED [4]. In addition to authorizationStatus, the GetFoundationModelAvailability response provides other availability details, including: agreementAvailability: The status of the model agreement [4]. entitlementAvailability: Whether the entitlement for the model is AVAILABLE or NOT_AVAILABLE [4]. regionAvailability: Whether the model is AVAILABLE or NOT_AVAILABLE in the requested region [4]. modelId: The identifier of the foundation model [4]. If the required IAM permission is missing, the request will result in an AccessDeniedException with an HTTP 403 status code [4].
Citations:
🏁 Script executed:
Repository: Tenurework/Tenure
Length of output: 1395
🌐 Web query:
AWS CLI get-foundation-model-availability --model-id syntax💡 Result:
To use the AWS CLI command to get foundation model availability in Amazon Bedrock, use the following syntax [1][2]: aws bedrock get-foundation-model-availability --model-id Required Parameter: --model-id (string): Specifies the model ID of the foundation model you want to query [1][3]. The model ID must be a string with a minimum length of 0 and a maximum of 140 characters, following a specific alphanumeric pattern [1][3]. Example Usage: aws bedrock get-foundation-model-availability --model-id amazon.titan-text-express-v1 This command retrieves information about the availability, authorization status, and entitlement of the specified foundation model [1][4]. Note that this is distinct from the get-foundation-model command, which uses the --model-identifier parameter to retrieve general details about a foundation model [5].
Citations:
Use
get-foundation-model-availabilityfor entitlement diagnostics.get-foundation-modelonly returns model metadata. For each bare model ID, callget-foundation-model-availability --model-id "$M"and publishauthorizationStatus,entitlementAvailability,agreementAvailability, andregionAvailability. Ensure the workflow role allowsbedrock:GetFoundationModelAvailability; otherwise the call returnsAccessDeniedException.🤖 Prompt for AI Agents