Pair your devices with a code and playback position follows you: pause on this device, hit resume on the other. Position is saved to the site every minute and on pause.
Open this panel on your other device and enter the same code.
Starts this lesson and continues through 14 more to the end of the course.
H2 is the only homework document you can run. One terraform apply creates a domain, IAM roles,
up to sixteen enabled blueprints, three project profiles and a project. It is eight days old; the
code was last released in August. The blog describes the module; the tag is
what runs. Where they differ, the tag wins.
H2 is the 11 Nov 2026 blog; "the repo" is
aws-ia/terraform-aws-sagemaker-unified-studio.
Repo citations are files fetched from main (verified 2026-11-19). I read the code; I did not
run it. Concepts (blueprint, profile, ON_CREATE) are in
lesson 3; the roles are in
lesson 2.
One domain, three teams, "three purpose-built project profiles, one for each team, on a shared domain, plus an initial project" (H2, intro).
| Team (H2) | Profile | Toggle |
|---|---|---|
| Data Analytics | SQL Analytics | enable_sql_analytics |
| Machine Learning | All Capabilities | enable_all_capabilities |
| Generative AI | Generative AI | enable_generative_ai |
"Team isolation is achieved by assigning users or groups to projects created from the appropriate project profile" (H2). Isolation is project membership, not separate domains.
H2's Figure 1 shows one account: a Domain feeding "Default Blueprints", a Project Profile, a Project with "Auto-Created Environments", IAM and Identity Center principals pointing at the Project, and an IAM box holding five roles: Service, Domain Execution, Manage Access, Provisioning, Query Execution.
| Fact | Value | Source (verified 2026-11-19) |
|---|---|---|
| Registry address | aws-ia/sagemaker-unified-studio/aws |
Registry API |
| Latest version | 0.2.1, published 2026-08-17; earlier 0.1.0, 0.2.0 (both 2026-07-02) |
Registry API; releases |
Registry verified flag |
false; 6,132 downloads |
Registry API |
main vs tag |
Last commit on main is the v0.2.1 merge, 2026-08-17. examples/quick-setup/main.tf is byte-identical on main and v0.2.1 |
commits API; cmp of both raw files |
| License | Apache-2.0 | repo API |
| Terraform | >= 1.7 (H2 says the same) |
versions.tf |
| Providers | hashicorp/aws >= 6.51.0, hashicorp/awscc >= 1.89.0, random >= 3.8.1, time >= 0.13.1 |
versions.tf |
| Newest providers | aws 6.73.0, awscc 1.110.0, both published 2026-11-11 |
aws, awscc |
"Dual provider: Uses both the AWS provider and AWS Cloud Control (AWSCC) provider" (H2). In the
code the domain and blueprint configuration use aws_datazone_domain and
aws_datazone_environment_blueprint_configuration; profiles, projects, memberships and policy
grants use awscc_datazone_project_profile, awscc_datazone_project,
awscc_datazone_project_membership and awscc_datazone_policy_grant.
Our read: the constraints are lower bounds, the module is pre-1.0, and H2's snippets give source
with no version. Pin the module and both providers.
⚠️ The root README says: "The most tested deployment path is the quick-setup example" (README).
| Layer (H2) | Module source | What it does in code | API underneath |
|---|---|---|---|
| 1. Domain | root module | V2 domain, Tooling blueprint, roles, S3 bucket, model governance project | CreateDomain with domainVersion V2 |
| 2. Blueprint | //modules/blueprint, one call per blueprint via for_each |
Enables one blueprint; grants CREATE_ENVIRONMENT_FROM_BLUEPRINT on the root domain unit by default |
aws datazone put-environment-blueprint-configuration |
| 3. Project profile | //modules/project-profile |
One profile per call. Tooling is added automatically, first (deployment_order = 0) |
aws datazone create-project-profile |
| 4. Project + membership | //modules/project, //modules/project-membership |
One project; one membership per principal | aws datazone create-project-membership |
| not counted | //modules/policy-grant-create-project |
Grants CREATE_PROJECT_FROM_PROJECT_PROFILE; quick-setup sets all_users = true |
aws datazone add-policy-grant |
| not counted | //modules/blueprint-bootstrap |
Creates the Provisioning and Manage Access roles; the root module calls it | IAM |
(CLI names verified in the
CLI reference,
2026-11-19.) H2 never mentions two more sub-modules: default-project-profile (enables
ToolingLite, S3Bucket, S3TableCatalog for bring-your-own-role projects) and
domain-management-portal (a singleton ADMIN project), or the second example,
examples/domain-management-and-bring-your-own-role.
The root module requires only vpc_id and subnet_ids. Role creation is a "3-tier resolution:
user-provided ARN → pre-existing role discovered in AWS → Terraform-managed role" (README).
terraform apply creates in the domain layer⚠️ Roles: H2 contradicts itself and the code. H2 Step 3 says "Three IAM roles will be created
(domain execution, manage access, provisioning)". H2's own Figure 1 draws five. The code creates
five (main.tf,
bootstrap main.tf):
| Role name in code | Managed policy attached |
|---|---|
AmazonSageMakerDomainExecution<8-char suffix> |
SageMakerStudioDomainExecutionRolePolicy |
AmazonSageMakerDomainService<suffix> |
SageMakerStudioDomainServiceRolePolicy |
AmazonSageMakerQueryExecution<suffix> |
SageMakerStudioQueryExecutionRolePolicy |
AmazonSageMakerProvisioning-<account_id>-<domain_id> |
SageMakerStudioProjectProvisioningRolePolicy |
AmazonSageMakerManageAccess-<region>-<domain_id> |
AmazonDataZoneSageMakerManageAccessRolePolicy, AmazonDataZoneGlueManageAccessRolePolicy, AmazonDataZoneRedshiftManageAccessRolePolicy, plus a custom Redshift secret policy |
All trust datazone.amazonaws.com. Manage Access is the role that grants on Glue and Redshift
data — see
SM0 lesson 5.
Bucket. sagemaker-studio-<account_id>-<region>-<suffix>, public access blocked, AES256 or
aws:kms if kms_key_identifier is set. ⚠️ H1's clean-up names
amazon-datazone-AWSACCOUNTID-AWSREGION-DOMAINID; do not search for that pattern after a
Terraform deploy.
⚠️ kms_key_identifier is a root-module input; the quick-setup example neither declares nor
passes it.
Model governance project. "The domain module automatically provisions a model governance
project … Members of the project can enable or disable specific models accessible in the domain"
(H2). The code creates a profile named
Generative AI model governance and a project named GenerativeAIModelGovernanceProject, with no
condition. ⚠️ The README calls these "(optional)" and the quick-setup README describes them as
"Bedrock model management and consumption roles"; neither matches main.tf, which creates no such
roles. The admin guide uses the same project name and says models "are published to the domain as
model assets through the GenerativeAIModelGovernanceProject project"
(Amazon Bedrock,
verified 2026-11-19).
From examples/quick-setup/variables.tf.
Eighteen, none required.
| Variable | Default | Note |
|---|---|---|
aws_region |
us-east-1 |
Validated against 15 Regions — the same 15 as the supported Regions page today |
domain_name, domain_description |
terraform-quick-setup-domain, fixed string |
Name: 1–64 chars, alphanumeric and hyphens |
vpc_id, subnet_ids |
null |
null = default VPC and all its subnets |
s3_bucket_name |
null |
null = create one |
user_role_policy_arns |
null |
Root default is SageMakerStudioProjectUserRolePolicy |
enable_generative_ai, enable_sql_analytics, enable_all_capabilities |
true |
See next table |
project_name, project_description |
terraform-quick-setup-project, fixed string |
A 6-hex-character suffix is appended to the name |
enable_sso |
false |
The one-way door, below |
project_owners, project_contributors |
{} |
Objects with sso_users, sso_groups, iam_users, iam_roles |
environment |
test |
Only dev, staging, prod, test |
owner, tags |
terraform-quick-setup, {} |
Tags only |
⚠️ terraform.tfvars.example is not the defaults. It sets aws_region = "us-west-2",
enable_all_capabilities = false and enable_sso = true. H2 Step 2 says copy it and edit.
⚠️ H2's tfvars has a variable the tag does not declare. H2 shows a top-level
sso_users = ["admin@example.com"]. variables.tf at v0.2.1 has no sso_users. H2's Layer 4
snippet also has depends_on on aws_datazone_user_profile.sso_users,
aws_datazone_user_profile.iam_users and awscc_datazone_group_profile.sso_groups; those
resources are not in the quick-setup example (they are in the bring-your-own-role example).
PR #42,
merged 2026-08-11, removed them: "Adding a user to a project automatically adds the user to the
domain." H2's snippets appear to come from different code than the published tag.
⚠️ Network auto-discovery is in the example, not the module, and it picks the default VPC, which "comes with a public subnet in each Availability Zone" (VPC guide). The admin guide asks for "at least 3 subnets in different Availability Zones" and says "Private subnets are recommended, not all functionality is available when selecting public subnets" (SQL analytics, verified 2026-11-19). The module validates only "At least one subnet ID required".
H2's table, corrected against
examples/quick-setup/main.tf:
| Toggle | Blueprints enabled (exact blueprint_name) |
Profile created (exact name) |
|---|---|---|
enable_generative_ai |
AmazonBedrockChatAgent, AmazonBedrockEvaluation, AmazonBedrockFlow, AmazonBedrockFunction, AmazonBedrockGuardrail, AmazonBedrockKnowledgeBase, AmazonBedrockPrompt |
Generative AI application development |
enable_sql_analytics |
DataLake, LakehouseCatalog, RedshiftServerless, QuickSight |
SQL analytics |
enable_all_capabilities |
All eleven above + EmrServerless, EmrOnEc2, MLExperiments, Workflows |
All capabilities |
Four deltas from H2:
BedrockChatAgent and so on; the API names carry the Amazon prefix. H2 writes
"EMR Serverless, EMR on EC2"; the code uses EmrServerless, EmrOnEc2; the
admin guide table
prints EMRServerless, EMRonEC2 and Quicksight. Use the code's spelling in Terraform.QuickSight. The tag enables it whenever SQL analytics or All capabilities is on,
regardless of enable_sso. H2's Figure 3 shows fourteen blueprint_ids and no quicksight
key, so the figure was not produced by v0.2.1. The admin guide says the blueprint needs the
domain and the Quick Sight account on "the same Identity Center instance"
(Quick Sight).
I could not verify what the apply does when that is untrue — check the page and test in a sandbox.Tooling is enabled by the root module and is not in blueprint_ids.What deploys on create. In both the SQL analytics and All capabilities profiles, two
configurations are ON_CREATE: DataLake (glueDbName = glue_db, editable) and
RedshiftServerless (redshiftDbName = dev, connectToRMSCatalog = true,
redshiftMaxCapacity = 512, the last two not editable). Everything else — Workflows
(environmentClass = mw1.micro), MLExperiments (mlflowTrackingServerSize = Small), both EMR
on EC2 variants (emr-7.5.0), EMR Serverless, the RMS catalog, a second Redshift workgroup,
Quick Sight, all Bedrock — is ON_DEMAND. The Generative AI profile is entirely ON_DEMAND.
⚠️ H2's override snippet omits the required blueprint attribute and uses the key
"RedshiftServerless", which exists only in the All capabilities local; in the SQL analytics
local the key is "Redshift Serverless". Its value = "1024": the Redshift guide says base
capacity above 512 RPUs is available only in listed Regions
(capacity).
The initial project uses "the first available profile", in the order All capabilities, SQL
analytics, Generative AI. Our read, from the code plus H1's definition of on create: unless only
Generative AI is enabled, the first apply itself provisions a Glue database and a Redshift
Serverless workgroup. H2's "minimal
ongoing costs" covers the domain, roles and bucket only.
Twenty-one in the example. H2 uses eight: domain_url, project_url, blueprint_ids,
project_profile_ids, domain_execution_role_arn, manage_access_role_arn,
provisioning_role_arn, s3_bucket_name. Also useful: domain_id, domain_root_unit_id,
domain_service_role_arn, tooling_blueprint_id, blueprint_names, project_id.
project_profile_ids is a list in the fixed order All capabilities, SQL analytics, Generative
AI. project_url is built as https://<domain_id>.datazone.<region>.on.aws/projects/<project_id>;
domain_url is the provider's portal_url, which H2's Figure 3 shows as
https://dzd-….sagemaker.us-west-2.on.aws. ⚠️ Two host patterns; I could not verify both
resolve — check after a sandbox apply.
"SSO users", "SSO groups", "IAM users", "IAM roles" (H2). The module maps sso_users and
iam_users to member.user_identifier, and sso_groups and iam_roles to
member.group_identifier
(membership main.tf).
That matches the admin guide: "When an IAM role is added to the domain, a group profile is
created" (user management,
verified 2026-11-19).
| Rule | Detail | Source |
|---|---|---|
| Designations used | PROJECT_OWNER, PROJECT_CONTRIBUTOR |
module; the API also lists PROJECT_CATALOG_VIEWER, PROJECT_CATALOG_CONSUMER, PROJECT_CATALOG_STEWARD, USER_CREATED_DESIGNATION |
| Same principal in both sets | "ownership wins" | membership README |
| Changing a designation | Destroy then create: "memberships have no update API" | membership README |
| Validation | sso_groups must be an identity store group UUID; IAM ARNs must be under the matching key |
variables.tf |
| Limit | "a maximum of 100 user profiles and 20 group profiles" per project | user guide |
| Caller | "The AWS caller identity that runs this Terraform code is added as a project owner" | H2; no explicit resource in the code |
IAM roles and SSO groups share the limit of 20. ⚠️ H2's use-case table labels
arn:aws:iam::123456789012:user/etl-service-account as an "IAM Role"; the module would reject a
user ARN under iam_roles. ⚠️ The membership README still says SSO users "must already have a
DataZone user profile"; main.tf at v0.2.1 has no such check (PR #42).
SageMakerStudioUserIAMConsolePolicy. IAM roles and users "must have the AWS managed
SageMakerStudioUserIAMConsolePolicy (or equivalent) attached to access the Amazon SageMaker
Unified Studio interface … The module doesn't automatically attach this policy" (H2). ARN
arn:aws:iam::aws:policy/SageMakerStudioUserIAMConsolePolicy, version v10; it allows, among
others, datazone:GetIamPortalLoginUrl, datazone:CreateProject and datazone:DeleteProject
(policy reference,
verified 2026-11-19). ⚠️ H1 says "you can't use IAM roles to log in"; H2 and the current user
guide say an "IAM user or role can sign into Amazon SageMaker Unified Studio". H1 is out of date.
The one-way door. enable_sso = true sets single_sign_on to type = "IAM_IDC",
user_assignment = "AUTOMATIC", using "the default IAM IDC instance that is enabled for the
account within the same region as the domain"; false sets DISABLED. H2: "This is a one way
door decision. If you change this later on the domain and all dependent resources need to be
destroyed and recreated." The console procedure agrees — "These settings cannot be changed once
you save them"
(Identity Center-based domains).
⚠️ The UpdateDomain
request body does list singleSignOn, and the console page lets you configure SSO on "an
existing" domain. I could not verify which transitions are really blocked. Treat both directions
as destroy-and-recreate until AWS says otherwise.
Same-account limitation. "Currently, only IAM principals within the same AWS account as the domain can access the Amazon SageMaker Unified Studio portal. Cross-account IAM role access might be limited" (H2).
Stages. H2: "deploy separate domains for development, staging, and production using Terraform
workspaces or separate state files". ⚠️ H3 separates stages by account. The module cannot do
that yet: issue #40,
"FEAT: Multi-Account Support", is open, and an add_cross_account branch sits 124 commits behind
main. H2's conclusion nonetheless says you can add "accounts by extending the same Terraform
configuration". ⚠️ "Only one IAM-based domain is available per AWS Account"; I could not verify
whether a module domain with enable_sso = false counts as one — check domains.
Cost (H2). Redshift Serverless "per RPU-hour when queries are running"; EMR Serverless "per vCPU and memory per second"; Bedrock "per input and output token"; S3 standard storage. H2 quotes no prices; see lesson 6.
Clean-up. Empty the bucket, then destroy:
terraform output s3_bucket_name
aws s3 rm s3://BUCKET_NAME --recursive
terraform destroy
"The bucket has force_destroy disabled intentionally"; skip the first step and "the destroy
will fail on the S3 bucket resource" (README). H2's warning: "This deletes all resources including
the domain, projects, and any data stored in the S3 bucket. Additionally, extra resources created
manually within the console won't be affected by this terraform destroy." The admin guide adds
that deleting a domain "is final" and "Subscription grants will NOT be removed"
(delete domains).
awscc_datazone_policy_grant can "successfully replace the
policy content but then return an AlreadyExists error" (quick-setup README). ⚠️ The README's
workaround, aws datazone delete-policy-grant, is not in the CLI reference (that URL
redirects); the command with those exact parameters is
aws datazone remove-policy-grant.-target.enable_profile_cleanup; neither is in modules/project/main.tf. The quick-setup README links
a user-guide quick-setup.html page that does not exist.Evidence for an issue or support case: module and provider versions, terraform version,
Region, domain_id, the failing resource address, the full error text.
hashicorp/aws >= 6.51.0 and hashicorp/awscc >= 1.89.0,
Terraform >= 1.7 (versions.tf).main.tf).enable_sql_analytics enable? DataLake, LakehouseCatalog,
RedshiftServerless, and in the tag also QuickSight (quick-setup main.tf).main.tf).main.tf).group_identifier (membership main.tf).SageMakerStudioUserIAMConsolePolicy or
equivalent; the module does not attach it (H2).enable_sso: changing it means destroying the domain and its
dependents (H2, Step 2).GenerativeAIModelGovernanceProject; its members
enable or disable models for the domain (H2; main.tf).terraform destroy? Empty the tooling bucket; force_destroy
is off (README).sso_users
variable and profile resources that v0.2.1 does not have, and Figure 3 lacks quicksight.UpdateDomain accepts
singleSignOn.enable_sso = false an IAM-based domain, limited to one per
account?" It decides whether dev and prod domains can share an account.QuickSight blueprint when our Quick Sight account is not on Identity
Center?" The tag enables it unconditionally.terraform.tfvars.example unchanged. Which profiles are created, and from which is the project built?iam_users. What happens, and why does the module care?terraform destroy fails. What is the most likely cause?main.tf creates domain execution, domain service and query execution; the bootstrap
sub-module adds provisioning and manage access. H2's Figure 1 draws all five.enable_all_capabilities = false. The project
takes the first available profile, so SQL analytics.iam_users. Users map to user_identifier,
roles to group_identifier, because the service gives a role a group profile.redshiftMaxCapacity under the "Redshift Serverless" key in
sql_analytics_blueprint_config, keeping the blueprint = "RedshiftServerless" attribute. H2's
snippet shows the All capabilities key and omits blueprint.force_destroy is disabled. Empty it and re-run.main.tf beside H2's toggle table; have the room find the
fourth SQL analytics blueprint and the two ON_CREATE entries.enable_sso.