Skip to content

Commit ce5a907

Browse files
committed
stepfunctions-bedrock-sam: Fix --input option for Messages API
1 parent d77fffe commit ce5a907

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stepfunctions-bedrock-sam/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Please refer to the architecture diagram below:
5757
Run the following AWS CLI command to send a 'start-sync-execution` command to start the Step Functions workflow. Note, you must edit the {StateMachineExpressSyncToBedrockArn} placeholder with the ARN of the deployed Step Functions workflow. This is provided in the stack outputs. Also, please update {your-region} with the region that you provided while running the SAM template.
5858
5959
```bash
60-
aws stepfunctions start-sync-execution --name "test" --state-machine-arn "{StateMachineExpressSyncToBedrockArn}" --input "{\"prompt\": \"\n\nHuman:Write 5 lines about how Moon was formed.\n\nAssistant:\"}" --region {your-region}
60+
aws stepfunctions start-sync-execution --name "test" --state-machine-arn "{StateMachineExpressSyncToBedrockArn}" --input "{\"prompt\": \"Write 5 lines about how Moon was formed.\"}" --region {your-region}
6161
```
6262

6363
### Example output:
@@ -70,22 +70,22 @@ aws stepfunctions start-sync-execution --name "test" --state-machine-arn "{Stat
7070
"startDate": "2024-01-08T11:49:18.981000+05:30",
7171
"stopDate": "2024-01-08T11:49:28.758000+05:30",
7272
"status": "SUCCEEDED",
73-
"input": "{\"prompt\": \"\\n\\nHuman:Write 5 lines about how Moon was formed.\\n\\nAssistant:\"}",
73+
"input": "{\"prompt\": \"Write 5 lines about how Moon was formed.\"}",
7474
"inputDetails": {
7575
"included": true
7676
},
77-
"output": "{\"Body\":{\"completion\":\" Here is a 5 line summary of how the Moon was formed:\\n\\n1. The leading theory is that the Moon formed from debris left over after a massive collision between the young Earth and a Mars-sized body about 4.5 billion years ago.\\n\\n2. This collision threw molten rock and debris into Earth's orbit that eventually cooled and coalesced into the Moon we see today. \\n\\n3. Over billions of years, the Moon's gravity caused Earth's rotation to slow down and its orbit to expand outward. \\n\\n4. The Moon likely had an intense period of volcanism in its early history, but volcanism ended around 3 billion years ago as the Moon's interior cooled.\\n\\n5. Without the stabilizing effect of the Moon, Earth would wobble more on its axis, causing more radical climate swings over long time periods.\",\"stop_reason\":\"stop_sequence\",\"stop\":\"\\n\\nHuman:\"},\"ContentType\":\"application/json\"}",
77+
"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\"}",
7878
"outputDetails": {
7979
"included": true
8080
},
8181
"billingDetails": {
8282
"billedMemoryUsedInMB": 64,
83-
"billedDurationInMilliseconds": 9800
83+
"billedDurationInMilliseconds": 4900
8484
}
8585
}
8686
```
8787
## Cleanup
88-
88+
8989
Delete the stack
9090
```bash
9191
sam delete

0 commit comments

Comments
 (0)