請問 AWS ECS TASK 不想被別的帳號看TASK到內容 要怎麼設定 好像只能 設 *
設上 TAG 下去限制也沒用
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecs:RegisterTaskDefinition",
"ecs:ListTaskDefinitions",
"ecs:DescribeTaskDefinition"
],
"Resource": "*"
}
]
}
把下面的 "your-account-id" 換成你的 IAM object, 就只有你可以 List task 了:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"ecs:DescribeTasks",
"ecs:ListTasks"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:PrincipalAccount": "your-account-id"
}
}
}
]
}