get_workout_plan_from_dynamodb
Retrieve a full workout plan from DynamoDB by user ID and plan ID, including all weeks, workout sessions, and exercises in one call.
Instructions
Retrieve a complete workout plan from DynamoDB
Fetches the entire workout plan structure including:
- Plan metadata (name, goal, duration, status, etc.)
- All weeks in the program
- All workout sessions for each week
- All exercises for each workout session
Args:
user_id: User ID who owns the plan
plan_id: Unique plan identifier
table_name: DynamoDB table name (default: WorkoutPlans)
region: AWS region (default: us-west-2)
Returns:
Dictionary containing the complete workout plan with plan_metadata and weeks,
or error information if the plan is not found or retrieval fails
Example:
result = get_workout_plan_from_dynamodb(
user_id="user_123",
plan_id="plan_abc123"
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | us-west-2 | |
| plan_id | Yes | ||
| user_id | Yes | ||
| table_name | No | WorkoutPlans |