Setting the file. One moment.
Subchapter 101.5
references/spending-limit.mdMarkdown3 KBView on GitHub
Amazon Braket spending limits provide optional per-device cost controls for quantum processing units (QPUs).
# Replace every <placeholder> with a value you looked up or the user supplied.
aws braket create-spending-limit \
--device-arn "arn:aws:braket:<region>::device/qpu/<provider>/<device-name>" \
--spending-limit "<amount-usd>" \
--time-period startAt=<epoch-seconds-start>,endAt=<epoch-seconds-end>
aws braket search-spending-limits
aws braket update-spending-limit --spending-limit-arn <arn> --spending-limit "<amount-usd>"
aws braket delete-spending-limit --spending-limit-arn <arn>Note that spending limits apply only to quantum tasks that were created during the spending limit’s time period and when the spending limit already exists.
The Braket SDK also provides near real-time cost tracking with the Tracker (opens in a new tab) class.
See the Getting Started notebook (opens in a new tab) for an example of how to use the cost tracker.
| Symptom | Cause | Fix |
|---|---|---|
Looks for a spending limit in amazon-braket-sdk | Wrong layer | Control-plane only — boto3 braket client, CLI, or CloudFormation |
| Creates one limit and expects it to cap the account | A limit is scoped to one deviceArn, and so to that ARN’s region | Create one limit per device you want to cap |
| Targets a simulator | Limits apply to QPU ARNs | Confirm supported device types in the CreateSpendingLimit reference (opens in a new tab) |
| Raises or deletes a limit to unblock its own task | Treating the guardrail as an obstacle | Report the rejection and stop; a change needs an explicit instruction — see above |
Expects Tracker to stop a run at a threshold | Estimate ≠ enforcement | Only a spending limit rejects tasks |
Reaches for qml.Tracker to count Braket shots | Assuming the Braket tracker is cost-only | quantum_tasks_statistics() reports per-device shots and task counts |
| Assumes modifying a spending limit leaves no trace | Limit changes are management events | CloudTrail records CreateSpendingLimit, UpdateSpendingLimit and DeleteSpendingLimit under braket.amazonaws.com — read the trail to see who changed a limit |