2 個答案
- 最新
- 最多得票
- 最多評論
2
You can leverage Condition operator in IAM JSON policy elements Eg. Boolean conditions enable the creation of Condition elements that limit access by comparing a key to either "true" or "false."
{
"Sid": "DenyLaunchingPublicAMI",
"Effect": "Deny",
"Action": "ec2:RunInstances",
"Resource": "arn:aws:ec2:<region>::image/ami-*",
"Condition": {
"Bool": {
"ec2:Public": "true"
}
}
Document:
已回答 8 個月前
1
You can also consult the following https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis
已回答 7 個月前
相關內容
- 已提問 7 個月前