Tried Grok 4.7 on Amazon Bedrock Runtime with AWS CLI
This page has been translated by machine translation. View original
Introduction
On September 28, 2026, Grok 4.7 became available on Amazon Bedrock.
Grok 4.7 is a model announced by SpaceXAI on September 21, 2026.
I verified whether Grok 4.7 can be called from the AWS CLI by following the steps in the previous article.
I also tested Structured outputs, reasoning effort, and service tiers, which are listed as supported in the 4.7 model card.
Verification Details
Verification Environment
| Item | Value |
|---|---|
| AWS CLI | aws-cli/2.37.2 |
| OS | Linux 7.1.13-402.asahi.fc44.aarch64+16k aarch64 |
| jq | jq-1.8.1 |
Global Inference Profile
I retrieved the Global inference profile in the Tokyo region.
aws bedrock get-inference-profile --region ap-northeast-1 --inference-profile-identifier global.xai.grok-4.7
{
"inferenceProfileName": "Global xAI Grok 4.7",
"description": "Routes requests to Grok 4.7 globally across all supported AWS Regions.",
"inferenceProfileArn": "arn:aws:bedrock:ap-northeast-1:<account-id>:inference-profile/global.xai.grok-4.7",
"models": [
{
"modelArn": "arn:aws:bedrock:::foundation-model/xai.grok-4.7"
},
{
"modelArn": "arn:aws:bedrock:ap-northeast-1::foundation-model/xai.grok-4.7"
}
],
"inferenceProfileId": "global.xai.grok-4.7",
"status": "ACTIVE",
"type": "SYSTEM_DEFINED"
}
I passed this ID to --model-id and ran converse. Authentication used the IAM credentials already configured in the AWS CLI as-is, without using a Bearer Token.
aws bedrock-runtime converse \
--region ap-northeast-1 \
--model-id global.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"動作確認です。日本語で「Grok 4.7 on Amazon Bedrock は利用可能です」と一文だけ返してください。"}]}]'
{
"output": {
"message": {
"role": "assistant",
"content": [
{
"reasoningContent": {
"redactedContent": "<base64、記事には転記しない>"
}
},
{
"text": "Grok 4.7 on Amazon Bedrock は利用可能です"
}
]
}
},
"stopReason": "end_turn",
"usage": {
"inputTokens": 47,
"outputTokens": 251,
"totalTokens": 298,
"cacheReadInputTokens": 0,
"cacheWriteInputTokens": 0
},
"metrics": {
"latencyMs": 2405
}
}
A reasoningContent.redactedContent was included before the text.
US Geo Inference Profile
When retrieving the US Geo inference profile in us-east-1, the routing destinations were 3 regions: us-east-1, us-east-2, and us-west-2.
aws bedrock get-inference-profile --region us-east-1 --inference-profile-identifier us.xai.grok-4.7
{
"inferenceProfileName": "US xAI Grok 4.7",
"description": "Routes requests to Grok 4.7 in us-east-1, us-east-2, us-west-2.",
"inferenceProfileArn": "arn:aws:bedrock:us-east-1:<account-id>:inference-profile/us.xai.grok-4.7",
"models": [
{
"modelArn": "arn:aws:bedrock:us-east-1::foundation-model/xai.grok-4.7"
},
{
"modelArn": "arn:aws:bedrock:us-east-2::foundation-model/xai.grok-4.7"
},
{
"modelArn": "arn:aws:bedrock:us-west-2::foundation-model/xai.grok-4.7"
}
],
"inferenceProfileId": "us.xai.grok-4.7",
"status": "ACTIVE",
"type": "SYSTEM_DEFINED"
}
I ran converse with the same message as Global, changing to --region us-east-1 --model-id us.xai.grok-4.7. The stopReason was end_turn, and the response text was "Grok 4.7 on Amazon Bedrock は利用可能です". The token count was input 47 / output 190, and latency was 1846 ms.
CloudTrail Records
I verified both converse calls using CloudTrail lookup-events.
aws cloudtrail lookup-events --region ap-northeast-1 --lookup-attributes AttributeKey=EventName,AttributeValue=Converse --max-results 20
For us-east-1, I ran it with --region us-east-1 instead.
Here is an excerpt of the event from the call made via the Global inference profile from ap-northeast-1.
{
"eventName": "Converse",
"awsRegion": "ap-northeast-1",
"requestParameters": {
"modelId": "global.xai.grok-4.7"
},
"additionalEventData": {
"inferenceRegion": "us-west-2",
"inputTokens": 47,
"outputTokens": 251
},
"managementEvent": true,
"eventCategory": "Management"
}
Converse was recorded as a management event. The region where a call via an inference profile was actually processed can be confirmed in additionalEventData.inferenceRegion.
Structured outputs
The Grok 4.7 model card lists Structured outputs as Supported in bedrock-runtime. I tested it by passing a JSON schema to textFormat in --output-config of Converse.
SCHEMA='{"type":"object","properties":{"service":{"type":"string"},"model":{"type":"string"},"regions":{"type":"array","items":{"type":"string"}}},"required":["service","model","regions"],"additionalProperties":false}'
aws bedrock-runtime converse \
--region ap-northeast-1 \
--model-id global.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"次の文から情報を抽出してください: Amazon Bedrock で Grok 4.7 が us-east-1、us-east-2、us-west-1 から利用できます。"}]}]' \
--output-config "$(jq -nc --arg s "$SCHEMA" '{textFormat:{type:"json_schema",structure:{jsonSchema:{name:"release_info",schema:$s}}}}')"
{
"output": {
"message": {
"role": "assistant",
"content": [
{
"reasoningContent": {
"redactedContent": "<base64、記事には転記しない>"
}
},
{
"text": "{\"service\":\"Amazon Bedrock\",\"model\":\"Grok 4.7\",\"regions\":[\"us-east-1\",\"us-east-2\",\"us-west-1\"]}"
}
]
}
},
"stopReason": "end_turn",
"usage": {
"inputTokens": 142,
"outputTokens": 498,
"totalTokens": 640,
"cacheReadInputTokens": 0,
"cacheWriteInputTokens": 0
},
"metrics": {
"latencyMs": 3710
}
}
The text contains JSON conforming to the schema, escaped as a string. Decoding is required to treat it as an object. With jq, you can extract it using fromjson.
aws bedrock-runtime converse \
--region ap-northeast-1 \
--model-id global.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"次の文から情報を抽出してください: Amazon Bedrock で Grok 4.7 が us-east-1、us-east-2、us-west-1 から利用できます。"}]}]' \
--output-config "$(jq -nc --arg s "$SCHEMA" '{textFormat:{type:"json_schema",structure:{jsonSchema:{name:"release_info",schema:$s}}}}')" \
| jq '.output.message.content[] | select(.text) | .text | fromjson'
{
"service": "Amazon Bedrock",
"model": "Grok 4.7",
"regions": [
"us-east-1",
"us-east-2",
"us-west-1"
]
}
Reasoning effort
I specified low / medium / high / xhigh for effort in --output-config and ran the same question. According to the model card, the default effort is high. The correct answer to the question is 53.
aws bedrock-runtime converse \
--region ap-northeast-1 \
--model-id global.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"1から100までの整数のうち、3でも5でも割り切れない数はいくつですか。数字だけ答えてください。"}]}]' \
--output-config '{"effort":"low"}'
For medium / high / xhigh, I ran the same command changing only the effort value.
Each value is a single measurement.
| effort | Answer | outputTokens | latencyMs |
|---|---|---|---|
| low | 53 | 349 | 2879 |
| medium | 53 | 858 | 5762 |
| high | 53 | 658 | 4098 |
| xhigh | 53 | 816 | 5442 |
All answers were correct, so no difference in accuracy due to effort was observed for this problem, but I was able to confirm that the output changes.
Data Retention Settings
The account data retention mode confirmed with aws bedrock get-account-data-retention --region us-east-1 was aws_review. In this state, I ran converse with the US Geo inference profile with data_retention_mode: none appended.
aws bedrock-runtime converse \
--region us-east-1 \
--model-id us.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"ゼロデータ保持モードの動作確認です。日本語で「成功」とだけ返してください。"}]}]' \
--additional-model-request-fields '{"data_retention_mode":"none"}'
The call was not rejected, the stopReason was end_turn, and the response text was "成功" (Success).
Service Tiers
The model card lists support for Priority (priced at 1.75x Standard) and Flex (0.5x). However, at the time of writing this article, an error occurred with both Global and US Geo, and they were not available.
Execution and errors when specifying Flex / Priority
aws bedrock-runtime converse \
--region ap-northeast-1 \
--model-id global.xai.grok-4.7 \
--messages '[{"role":"user","content":[{"text":"動作確認です。日本語で「Grok 4.7 on Amazon Bedrock は利用可能です」と一文だけ返してください。"}]}]' \
--service-tier type=flex
aws: [ERROR]: An error occurred (ValidationException) when calling the Converse operation: The provided service tier is not supported for this model.
The same error occurred with --service-tier type=priority and with us.xai.grok-4.7 in us-east-1.
Pricing
The Standard tier pricing listed on the model card is as follows per 1M tokens.
| Inference option | Input | Output | Cache read |
|---|---|---|---|
| Geo CRIS | $2.20 | $6.60 | $0.55 |
| Global CRIS | $2.00 | $6.00 | $0.50 |
Global is approximately 10% cheaper than Geo for input, output, and cache reads. According to the model card, Grok 4.7 is not available In-Region, so these two are the only options.
The Geo CRIS and Global CRIS prices listed on the Grok 4.6 model card are the same amounts, meaning the unit prices remain unchanged in 4.7.
Summary
Grok 4.7 can be used with IAM authentication simply by passing the inference profile ID to the AWS CLI converse command.
If you are already using Grok 4.6 with bedrock-runtime inference profiles, it will work by replacing the model-id in converse with global.xai.grok-4.7 or us.xai.grok-4.7.
Anthropic and OpenAI models available via Bedrock are billed through AWS Marketplace and are not eligible for AWS credits. On the other hand, Grok 4.6 is billed directly through AWS, like Nova and open models, and I have confirmed it can be offset using AWS credits.
Please give Grok a try as one of the models available in Bedrock Runtime.
