Open licedric opened 2 months ago
Confirmed. Changing the inline permission's resource from "arn:aws:sagemaker:*:*:*amazon-braket-*"
to "arn:aws:sagemaker:*:*:*experiment-*"
in L22 and L34 of the policy makes the cleanup step complete successfully.
Here is the full policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "searchpermissions",
"Effect": "Allow",
"Action": [
"sagemaker:Search"
],
"Resource": "*"
},
{
"Sid": "experimentpermissions",
"Effect": "Allow",
"Action": [
"sagemaker:CreateExperiment",
"sagemaker:DeleteExperiment",
"sagemaker:DescribeExperiment",
"sagemaker:ListExperiments",
"sagemaker:UpdateExperiment"
],
"Resource": "arn:aws:sagemaker:*:*:*experiment-*"
},
{
"Sid": "trialpermissions",
"Effect": "Allow",
"Action": [
"sagemaker:CreateTrial",
"sagemaker:DeleteTrial",
"sagemaker:DescribeTrial",
"sagemaker:ListTrials",
"sagemaker:UpdateTrial"
],
"Resource": "arn:aws:sagemaker:*:*:*experiment-*"
},
{
"Sid": "trialcomponentpermissions",
"Effect": "Allow",
"Action": [
"sagemaker:AssociateTrialComponent",
"sagemaker:CreateTrialComponent",
"sagemaker:DeleteTrialComponent",
"sagemaker:DescribeTrialComponent",
"sagemaker:DisassociateTrialComponent",
"sagemaker:ListTrialComponents",
"sagemaker:UpdateTrialComponent"
],
"Resource": "arn:aws:sagemaker:*:*:experiment-*"
}
]
}
When running the notebook, I run into this error when running the last cell to clean up:
Seems like cleaning up uses the ListTrials action, and the provided inline policy only allows arns containing
amazon-braket
.