Open TheArvinLim opened 1 year ago
Hi @TheArvinLim, thanks for reporting this! Would you be able to help me complete your code sample to reproduce the issue? What are endpoint
and sagemaker_full_access_role
?
Also, the output of pulumi about
would be very helpful to determine all versions.
Hi @thomas11, thanks for the quick reply!
This is the output of pulumi about
:
CLI
Version 3.48.0
Go Version go1.19.2
Go Compiler gc
Host
OS debian
Version 11.6
Arch aarch64
Definition of sagemaker_full_access_role
:
sagemaker_full_access_role = aws.iam.Role(
resource_name="sagemaker-full-access",
name="sagemaker-full-access",
assume_role_policy=json.dumps(
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {"Service": "sagemaker.amazonaws.com"},
"Action": "sts:AssumeRole",
}
],
}
),
managed_policy_arns=[
"arn:aws:iam::aws:policy/AmazonSageMakerFullAccess",
],
Definition of endpoint
:
s3_uri = f"s3://{workspace_name}-endpoint-bucket/endpoint-data-capture-logs/"
endpoint_configuration = aws.sagemaker.EndpointConfiguration(
resource_name="test_endpoint",
name="test_endpoint",
data_capture_config=aws.sagemaker.EndpointConfigurationDataCaptureConfigArgs(
destination_s3_uri=s3_uri,
initial_sampling_percentage=100,
enable_capture=True,
capture_options=[
aws.sagemaker.EndpointConfigurationDataCaptureConfigCaptureOptionArgs(capture_mode="Output"),
aws.sagemaker.EndpointConfigurationDataCaptureConfigCaptureOptionArgs(capture_mode="Input"),
],
capture_content_type_header=aws.sagemaker.EndpointConfigurationDataCaptureConfigCaptureContentTypeHeaderArgs(
csv_content_types=["text/csv"], json_content_types=["application/json"]
),
),
production_variants=[
aws.sagemaker.EndpointConfigurationProductionVariantArgs(
variant_name="test_variant",
model_name="test_model",
initial_instance_count=1,
instance_type="ml.m5.xlarge",
)
],
)
endpoint = aws.sagemaker.Endpoint(
resource_name="test_model",
name="test_model",
endpoint_config_name=endpoint_configuration.id,
)
Pulumi returns READ error after creating monitoring schedule and crashes.
Expected behavior
Monitoring schedule is created and no READ error occurs, the Pulumi program finishes without errors.
Current behavior
After creating a data quality job definition and passing it into a monitoring schedule, Pulumi returns the following error:
This occurs after the monitoring schedule is created - the schedule can be seen created successfully in Sagemaker Studio, but immediately after Pulumi throws the READ error and crashes.
Steps to reproduce
Context (Environment)
We are trying to create resources that are used for model deployment on Sagemaker. Part of this is taking a model in the model registry, deploying it to an endpoint and then creating data quality / model quality job schedules on that endpoint.
The issue is that Pulumi crashes before finishing, so even though the schedule seems to be created successfully, resources that are deployed afterwards will not be deployed.
I have tested the above flow using the AWS CLI, and the definition / schedule seem to be created without any issues. I have also tried using the CLI to describe the definition / schedule, and there is no issues with reading the resource properties. The issue seems to lie with Pulumi.