[英]AWS SageMaker is not authorized to perform: ecr:CreateRepository on resource: *
I am creating my own Docker image so that I can use my own models in AWS SageMaker. 我正在创建自己的Docker映像,以便可以在AWS SageMaker中使用自己的模型。 I sucessfully created a Docker image using command line inside the Jupyter Notebook in SageMaker ml.t2.medium instance using a customized Dockerfile:
我使用自定义Dockerfile在SageMaker ml.t2.medium实例中的Jupyter Notebook中使用命令行成功创建了一个Docker映像:
REPOSITORY TAG IMAGE ID CREATED SIZE
sklearn latest 01234212345 6 minutes ago 1.23GB
But when I run in Jupyter: 但是当我在Jupyter中运行时:
! aws ecr create-repository --repository-name sklearn
I get the following error: 我收到以下错误:
An error occurred (AccessDeniedException) when calling the CreateRepository operation: User: arn:aws:sts::1234567:assumed-role/AmazonSageMaker-ExecutionRole-12345/SageMaker is not authorized to perform: ecr:CreateRepository on resource: *
I already set up SageMaker, EC2, EC2ContainerService permissions and the following policy for EC2Container but I still get the same error. 我已经设置了SageMaker,EC2,EC2ContainerService权限以及EC2Container的以下策略,但是仍然遇到相同的错误。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sagemaker:*",
"ec2:*"
],
"Resource": "*"
}
]
}
Any idea on how I can solve this issue? 关于如何解决此问题的任何想法吗?
Thanks in advance. 提前致谢。
I solved the problem. 我解决了问题。 We must set a permission at SageMaker Execution Role as following:
我们必须在SageMaker执行角色上设置权限,如下所示:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:*" ],
"Resource": "*"
}
]}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.