-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
Hi team,
I'm in the process of setting up our AWS SageMaker Unified Studio infrastructure. We're using CDK v2 Python as IaC. As part of this process, I need to integrate the new unified domain with our AWS Identity Center instance. It appears to be possible through the console (click-ops), but I need to make it work with CDK.
The following code
single_sign_on = cdk.aws_datazone.CfnDomain.SingleSignOnProperty(
idc_instance_arn=cfg.sso.idc_instance_arn,
type="IAM_IDC",
user_assignment="AUTOMATIC"
)
domain = cdk.aws_datazone.CfnDomain(
self,
"Domain",
name=domain_name,
description="AWS SageMaker Unified Studio unified domain for Siemens Energy Catalyst.",
domain_version="V2", # This creates a SageMaker Unified Studio unified domain (V2) instead of the older Amazon DataZone domain (V1).
single_sign_on=single_sign_on,
domain_execution_role=domain_execution_role.role_arn,
service_role=domain_service_role.role_arn,
)
resutls in the following error at deployment:
(Domain) Resource handler returned message: "Cannot invoke "String.equals(Object)" because the return value of "software.amazon.datazone.domain.SingleSignOn.getType()" is null"
This appears to be an issue with the CDK construct.
Thank you in advance for your assistance with this.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version
No response
Expected Behavior
I should be able to integrate SingleSignOn through CDK with the provided class.
Current Behavior
Error upon deployment:
(Domain) Resource handler returned message: "Cannot invoke "String.equals(Object)" because the return value of "software.amazon.datazone.domain.SingleSignOn.getType()" is null"
Reproduction Steps
You can use the code snippet to run into this issue:
single_sign_on = cdk.aws_datazone.CfnDomain.SingleSignOnProperty(
idc_instance_arn=cfg.sso.idc_instance_arn,
type="IAM_IDC",
user_assignment="AUTOMATIC"
)
domain = cdk.aws_datazone.CfnDomain(
self,
"Domain",
name=domain_name,
description="AWS SageMaker Unified Studio unified domain for Siemens Energy Catalyst.",
domain_version="V2", # This creates a SageMaker Unified Studio unified domain (V2) instead of the older Amazon DataZone domain (V1).
single_sign_on=single_sign_on,
domain_execution_role=domain_execution_role.role_arn,
service_role=domain_service_role.role_arn,
)
Possible Solution
No response
Additional Information/Context
I tried using a dictionary with CloudFormation values in it instead of the instance of the CfnSingleSignOnProperty.
{"Type": "IAM_IDC", "UserAssignment": "AUTOMATIC"}
to no avail.
AWS CDK Library version (aws-cdk-lib)
v2.219.0
AWS CDK CLI version
2.1029.2 (build fccc5f9)
Node.js Version
v24.3.0
OS
Windows
Language
Python
Language Version
3.13.5
Other information
No response