StrataNotebook
A StrataBI Platform Module
Powered by Shaleio
Tier: Premium MX · module id stratanotebook · type multi_page_app (an app StrataBI renders from its own pages) · requires StrataBI · stands alone
StrataNotebook manages SageMaker Studio JupyterLab environments from inside StrataBI: provision now or on a schedule, open with short-lived launch links, auto-stop compute at a server-side deadline, and keep notebook storage between sessions. Everything runs in your account, in SageMaker domains you approve.
What you get
| Tab | Purpose |
|---|---|
| Active Environments | Your workspaces and live SageMaker apps (managed vs external/read-only). Pick a workspace and an action — Open, Start, Stop, Extend, Teardown — then press ▷ on Result. |
| Provision | A Setup check showing what this install can provision, then domain, user profile, instance type and session length; press ▷ on Provisioning. |
| Schedules | Future and recurring provisioning via EventBridge Scheduler; pause, resume, delete. |
| History | Provisioning, access issuance (never the URLs), starts, stops, extensions, teardowns. |
Actions run only when you press ▷ — changing a dropdown never triggers one. Open returns a one-time launch link straight to your browser; it is never stored (requires StrataBI core 1.7.14+). Active Environments shows each workspace's profile, instance type, the state SageMaker reports, when compute stops and the time left, and a visible error if a scheduled stop failed.
About AWS access. Users don't get an AWS Console login, but code in a notebook runs as the SageMaker profile's execution role and can use that role's AWS permissions. Your organization creates and scopes that role; StrataNotebook never creates or widens one, and refuses to work with a profile whose role isn't on approved_execution_roles.
Install and update
stratactl install stratanotebook
stratactl update stratanotebook --to <version>
stratactl uninstall stratanotebookSet up a SageMaker domain
StrataNotebook works inside an existing SageMaker Studio domain. Until one is approved, the Provision page's Setup tile explains what's missing.
# 1. find (or create) a domain and a user profile
aws sagemaker list-domains --query 'Domains[].[DomainId,DomainName,Status]' --output table
aws sagemaker create-user-profile --domain-id d-xxxxxxxxxxxx --user-profile-name analyst
# 2. approve them for StrataNotebook (stored settings), then update
B=s3://<strataci-bucket>/config/stratanotebook.auto.tfvars.json
aws s3 cp $B nb.json || echo '{}' > nb.json
# set "approved_domains": "d-xxxxxxxxxxxx", "approved_user_profiles": "analyst",
# "approved_execution_roles": "arn:aws:iam::<acct>:role/<your-notebook-role>"
aws s3 cp nb.json $B
stratactl update stratanotebookThe update grants StrataNotebook's SageMaker permissions scoped to the approved domains only. Creating a domain needs a VPC, subnets and an execution role (the AmazonSageMakerFullAccess managed policy is the usual starting point); the domain itself costs little, and you pay for storage and for instances while they run.
Execution role trust policy. SageMaker must be allowed to assume the role and set a source identity on it (Studio tags each session with the user profile). With only sts:AssumeRole, starting JupyterLab fails with "SageMaker was unable to assume the role … to sts:SetSourceIdentity":
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": { "Service": "sagemaker.amazonaws.com" },
"Action": ["sts:AssumeRole", "sts:SetSourceIdentity"]
}]
}Settings
| Setting | Default | Meaning | |
|---|---|---|---|
sagemaker_domain_ids → approved_domains | — (required to provision) | Existing domain ids, comma-separated. | |
approved_user_profiles | any profile in the domain | Allowed user profiles. | |
allowed_instance_types | ml.t3.medium,ml.m5.large | Instance types offered. | |
default_session_minutes / max_session_minutes | 240 / 480 | Session length; compute auto-stops at the deadline. | |
max_active_per_user / max_active_total | 2 / 10 | Concurrency limits. | |
default_storage_gb / max_storage_gb | 20 / 100 | Space storage. | |
approved_execution_roles | — (required) | Customer-owned SageMaker execution role ARNs. A profile running as any other role is refused. | |
user_profile_map | — | Which StrataBI users may use which profiles: `dave@x.com=dave;alex@x.com=alex\ | analyst`. Blank = any approved profile. |
owner_mode | actor | Who owns a workspace: the signed-in StrataBI user (per browser session when StrataBI has no auth), session, or event. | |
alarm_topic_arn | — | SNS topic for the stop/provision failure alarms. | |
allow_space_deletion | false | Allow permanently deleting a space (destroys its storage). Normal teardown keeps storage. |
AWS services
Everything below runs in your AWS account. It is created by the install unless noted.
| Service | Used for | Required |
|---|---|---|
| Amazon SageMaker (Studio) | Spaces + JupyterLab app lifecycle in approved existing domains. StrataNotebook never creates or deletes domains. | Yes |
| Amazon DynamoDB | Workspaces, leases, schedules, operations, run history. | Yes |
| AWS Lambda | Router, provisioner, managers, access, teardown, reconciler, history. | Yes |
| Amazon EventBridge Scheduler | Scheduled provisioning + per-session shutdown deadline. | Yes |
| Amazon SQS | Scheduler target DLQ. | Yes |
| Amazon S3 | Transient tile result artifacts (no-store). | Yes |
| AWS IAM | One scoped role per function; reviewable independently by Enterprise IT. | Yes |
| Amazon CloudWatch Logs | Runtime logs. | Yes |
It also uses pieces of your existing StrataBI install: the system S3 bucket, the module registry (DynamoDB) and, for tile results, the <name_prefix>-status-writer Lambda.
How it works
| Lambda | Does |
|---|---|
api_handler | Front door for the page tiles: option lists, the Setup check, and actions. |
workspace_provisioner | Creates the space and starts JupyterLab (the only role with CreateSpace/CreateApp). |
workspace_manager / inventory_manager | The Active Environments view and live inventory (read-only). |
schedule_manager | Schedules view and EventBridge schedule management. |
access_manager | Mints short-lived presigned launch URLs (the only role with CreatePresignedDomainUrl). |
teardown_manager / lease_reconciler | Stop compute at the deadline; a periodic sweep catches anything missed. |
history_manager | The History view. |
Page tiles are synchronous, so views and actions render as soon as the Lambda answers; the heavy SageMaker work is handed to workspace_provisioner in the background.
Troubleshooting
- Setup says "Provisioning isn't set up" — approve a domain, profile and execution role (above).
- "SageMaker was unable to assume the role … sts:SetSourceIdentity" — add
sts:SetSourceIdentityto the execution role's trust policy (see above), then press Start again. - "…isn't an approved execution role" — add the profile's role ARN to
approved_execution_roles(or give the profile an approved role). - "Stop failed" on a workspace — the scheduled stop errored (it retries, then alarms); check the
teardown_managerlogs and stop it with Stop. - "Pick a workspace first" — choose one in the Workspace dropdown; none yet? Use Provision.
- Open fails right after Provision — the environment takes a minute to reach RUNNING; refresh Active Environments with ▷.
Shaleio