Skip to content

Conversation

@kakakakakku
Copy link
Contributor

Issue #, if available:
N/A

Description of changes:
Hi😀 Thanks for the useful patterns!

I noticed that Claude 2.1 can no longer be used. When actually deployed, the following error occurs:

This model version has reached the end of its life. Please refer to the AWS documentation for more details. (Service: BedrockRuntime, Status Code: 404, Request ID: 721bc128-d706-4a50-91ff-9851b0537c37) (SDK Attempt Count: 1)

Therefore, I updated the model to use Claude Sonnet 4.5 instead.

Check

$ aws stepfunctions start-sync-execution  --name "test" --state-machine-arn "arn:aws:states:us-east-1:000000000000:stateMachine:StateMachineExpressSyncToBedrock-zGv6h6rBCtpl" --input "{\"prompt\": \"Write 5 lines about how Moon was formed.\"}" --region us-east-1
{
    "executionArn": "arn:aws:states:us-east-1:000000000000:express:StateMachineExpressSyncToBedrock-zGv6h6rBCtpl:test:4a73f058-b2ea-40fe-aa56-b1bc4fcb27ea",
    "stateMachineArn": "arn:aws:states:us-east-1:000000000000:stateMachine:StateMachineExpressSyncToBedrock-zGv6h6rBCtpl",
    "name": "test",
    "startDate": "2025-11-10T00:04:51.504000+09:00",
    "stopDate": "2025-11-10T00:04:57.711000+09:00",
    "status": "SUCCEEDED",
    "input": "{\"prompt\": \"Write 5 lines about how Moon was formed.\"}",
    "inputDetails": {
        "included": true
    },
"output": "{\"Body\":{\"model\":\"claude-sonnet-4-5-20250929\",\"id\":\"msg_bdrk_014iQLvHi98ir4DN9aaqNs1P\",\"type\":\"message\",\"role\":\"assistant\",\"content\":[{\"type\":\"text\",\"text\":\"# How the Moon Was Formed\\n\\n1. **Giant Impact**: About 4.5 billion years ago, a Mars-sized object called Theia collided with the early Earth in a catastrophic impact.\\n\\n2. **Debris Field**: The collision ejected massive amounts of rocky debris from both Earth and Theia into orbit around our planet.\\n\\n3. **Accretion Process**: This orbiting debris gradually clumped together through gravitational attraction over millions of years.\\n\\n4. **Moon Formation**: The accumulated material eventually coalesced to form the Moon, which initially orbited much closer to Earth than it does today.\\n\\n5. **Supporting Evidence**: This \\\"Giant Impact Hypothesis\\\" is supported by the Moon's composition being similar to Earth's mantle and its relatively small iron core.\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":18,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":173}},\"ContentType\":\"application/json\"}",
    "outputDetails": {
        "included": true
    },
    "billingDetails": {
        "billedMemoryUsedInMB": 64,
        "billedDurationInMilliseconds": 4900
    }
}

Thank you😀


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

}
]
}
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefinitionUri: statemachine/bedrock-integration.asl.json
DefinitionSubstitutions:
ModelId: !Sub arn:aws:bedrock:${AWS::Region}::foundation-model/anthropic.claude-v2:1
ModelId: !Sub arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:inference-profile/global.anthropic.claude-sonnet-4-5-20250929-v1:0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: Use inference profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants