Skip to content

Commit 5d3f964

Browse files
fix: fix broken permissions for sagemaker studio role (#441)
1 parent 941198d commit 5d3f964

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### **Changed**
1313

14+
- fixed `sagemaker-studio` role broken describe image version permissions
15+
1416
## v3.2.5
1517

1618
### **Added**

modules/sagemaker/sagemaker-studio/helper_constructs/sm_roles.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,12 @@ def __init__(
316316
"sagemaker:DescribeImage",
317317
"sagemaker:DescribeImageVersion",
318318
"sagemaker:ListImageVersions",
319+
"sagemaker:DescribeAppImageConfig",
319320
],
320321
resources=[
321-
f"arn:{Aws.PARTITION}:sagemaker:{Aws.REGION}:{Aws.ACCOUNT_ID}:image/*"
322-
f"arn:{Aws.PARTITION}:sagemaker:{Aws.REGION}:{Aws.ACCOUNT_ID}:image-version/*/*"
322+
f"arn:{Aws.PARTITION}:sagemaker:{Aws.REGION}:{Aws.ACCOUNT_ID}:image/*",
323+
f"arn:{Aws.PARTITION}:sagemaker:{Aws.REGION}:{Aws.ACCOUNT_ID}:image-version/*/*",
324+
f"arn:{Aws.PARTITION}:sagemaker:{Aws.REGION}:{Aws.ACCOUNT_ID}:app-image-config/*",
323325
],
324326
)
325327
]

modules/sagemaker/sagemaker-studio/stack.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ def enable_domain_resource_isolation(self, roles: List[iam.Role]) -> None:
303303
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:project/*",
304304
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:app/*",
305305
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:space/*",
306+
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:image/*",
307+
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:image-version/*/*",
308+
f"arn:{core.Aws.PARTITION}:sagemaker:{core.Aws.REGION}:{core.Aws.ACCOUNT_ID}:app-image-config/*",
306309
],
307310
conditions={
308311
"StringNotEquals": {

0 commit comments

Comments
 (0)