aws sns create-topic --name ecr-cross-account-topic --region
aws sns subscribe --topic-arn --protocol email --notification-endpoint --region
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": ""
},
"Action": "sts:AssumeRole"
}
]
}
此时在辅助帐户中,可以使用带有访问令牌的Docker命令来访问主帐户中的ECR资源。