I saw this link: https://github.com/aws/sagemaker-python-sdk/issues/912, it's similar to my question but not the same, my error is:
Please make sure all images included in the model for the production variant AllTraffic exist, and that the execution role used to create the model has permissions to access them.
Because of the security setting of my AWS account, I can't attach SageMaker fullaccess to the execution role, but I did add :
{
"Effect": "Allow",
"Action": [
"ecr:SetRepositoryPolicy",
"ecr:CompleteLayerUpload",
"ecr:BatchGetImage",
"ecr:BatchDeleteImage",
"ecr:UploadLayerPart",
"ecr:DeleteRepositoryPolicy",
"ecr:InitiateLayerUpload",
"ecr:DeleteRepository",
"ecr:PutImage"
],
"Resource": "arn:aws:ecr:*:*:repository/*sagemaker*"
},
in the policies and attached to this execution role, I'm new to SageMaker, does anyone know why I got this error?
Here's some of the codes:
from sagemaker.tensorflow.serving import Model
model = Model(model_data=model_data,
role=role,
framework_version='1.15.2',
sagemaker_session=sagemaker_session,
name=name)
predictor = model.deploy(initial_instance_count=1,
instance_type='ml.m4.2xlarge',
endpoint_name=name,
update_endpoint=False)