Skip to content

Commit 4d9d7b8

Browse files
author
Basil Beirouti
committed
removed hardcoded role and replaced with boto3 call
1 parent 61b95fa commit 4d9d7b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/integ/test_marketplace.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ def test_create_model_package(sagemaker_session, boto_session, iris_image):
251251
validation_input_path = "s3://" + s3_bucket + "/validation-input-csv/"
252252
validation_output_path = "s3://" + s3_bucket + "/validation-output-csv/"
253253

254-
role = "arn:aws:iam::142577830533:role/SageMakerRole"
254+
iam = boto_session.resource("iam")
255+
role = iam.Role("SageMakerRole").arn
255256
sm_client = boto_session.client("sagemaker")
256257
s3_client = boto_session.client("s3")
257258
s3_client.put_object(

0 commit comments

Comments
 (0)